Re: Proof of Concept : 3.5x and more Performance Boost for php7 using 4 cores

From: Date: Fri, 27 Nov 2015 13:41:33 +0000
Subject: Re: Proof of Concept : 3.5x and more Performance Boost for php7 using 4 cores
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-89464@lists.php.net to get a copy of this message
On Fri, 2015-11-27 at 11:02 +0100, Pascal KISSIAN wrote: > > I made a simple test to know if it was possible to speed-up php > performance > by using parallel programming. [...] > Use : > > OMP_NUM_THREADS=xx /path_to/php test_file.php 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. 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) So please run tests with a "typical" application (like wordpress or such) in a more typical environment. johannes

« previous php.internals (#89464) next »