Re: [PHP4BETA] MAJOR: Optimization patch committed
| From: | Zeev Suraski | Date: | Mon, 12 Apr 1999 22:46:59 +0000 |
| Subject: | Re: [PHP4BETA] MAJOR: Optimization patch committed | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-98@lists.php.net to get a copy of this message | ||
At 21:28 12/04/99 +0200, Stig Sæther Bakken wrote:
>Zeev Suraski wrote:
>>
>> Stig - if you're running a site that's in one stage or another of being in
>> production, make sure you don't rely on this for at least the next 24
>> hours, until it gets through its childhood :)
>
>I know I am an optimistic type, but not enough to even consider running
>a production site on php4 yet :-)
Heh :)
Here are some interesting benchmarks. They're probably not very
representative of today's platforms as its an old P100/Linux, but still,
it's interesting. In all cases, a loop on $i going between 0 and 999,999
was run, and in each iteration, one function call was made. strlen() is
the standard internal strlen(), foo() is a user function that receives one
argument and does nothing (empty body):
before
------
strlen("foo") 1,000,000 41.03 secs
foo("foo") 1,000,000 47.26 secs
after
-----
strlen("foo") 1,000,000 22.73 secs
foo("foo") 1,000,000 40.00 secs
As you can see, the time of built in functions has been almost cut in half,
which brings us to about the same area as Perl. The optimizer will
hopefully bring us all the way and perhaps even further, I haven't yet
tested it there.
Zeev
--
Zeev Suraski <zeev@zend.com> http://www.zend.com/
For a PGP public key, finger bourbon@netvision.net.il
--
PHP 4 Beta