Hi Johannes, thanks for the answer, -----Message d'origine----- De : Johannes Schlüter [mailto:johan...@schlueters.de] Envoyé : vendredi 27 novembre 2015 14:42 À : Pascal KISSIAN Cc : internals@lists.php.net Objet : Re: [PHP-DEV] Proof of Concept : 3.5x and more Performance Boost for php7 using 4 cores
>Your test runs a single PHP process. Mind that in a typical deployment on a >server you have quite a few parallel PHP processes already competing for time >on the CPU (when not >waiting for IO) a benchmark should reflect that. You can see at http://poc.yakpro.com/?php7_performance_boost_parallel_computing , in the " Faq: Is it usefull on a heavy traffic web site? " section, a graph that answers partially your question. >For in_array I'm assuming that often either one or no match exist, thus in >average the old algorithm has to process half the elements in average. With >that form of parallelization it >will process C/(N -1) + C/2N elements where C >is the count of elements and N the number of cores, so in total need more CPU. >(might be wrong) In the new algorithm, each core processes C/2N elements in parallel, and when one core has found a result, the process is stopped for the other cores... so the average cpu need is C/2N * N so exactly the same C/2. >So please run tests with a "typical" application (like wordpress or >such) in a more typical environment. Do you know a real application that is executing only array_sum() or in_array() functions? If the time of those functions represent only 0.5% of global run time, we will just speed-up those 0.5%.... I have not rewritten all php in parallel... I just did a "Proof of Concept", to be sure that it is possible to run some php functions in parallel, and this in less time. And I hope that many people will be interested to start thinking parallel in php, as the next speed improvements in hardware will be the multiplication of cores in a cpu. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php