Re: deep investigation of PHP_Callback

From: Date: Sun, 06 May 2007 07:56:04 +0000
Subject: Re: deep investigation of PHP_Callback
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-46628@lists.php.net to get a copy of this message
Le 6 mai 07 à 02:22, Travis Swicegood a écrit :
Using this assumption as the base, I put together a quick script to generate PHP files to benchmark against (script is available at http://plumb.domain51.com/pear/gen.phps). Using the following ab command I got these results: ab -c 100 -t 60 http://localhost/path/to/[proc|pear].php > proc|pear.ab
proc.php:Requests per second:    165.57 [#/sec] (mean)
pear.php:Requests per second:    111.89 [#/sec] (mean)
Using this as the code to benchmark against, PHP_Callback (pear) code is roughly 33% slower, not 320% - 350%. It is still a sizable amount and one to be taken into account when optimizing code, but given the other areas where code is almost certainly not optimized within any given project, this would probably be one of the last areas you were start trying to squeeze the milliseconds out of the code.
Here are my results for your scripts on a MacBookPro 2.33 Ghz Core Duo:
Proc: Requests per second:    3127.15 [#/sec] (mean)
Pear: Requests per second:    585.43 [#/sec] (mean)
That's 5 times slower. It is, I think, a lot closer to truth than your own results... For other tests, I am in line with Greg's results. -- Bertrand Mansion Mamasam Work : http://www.mamasam.com Blog : http://golgote.freeflux.net

« previous php.pear.dev (#46628) next »