Re: [PHP4BETA] PHP3 outperforms PHP4... :-)

From: Date: Mon, 12 Apr 1999 08:18:09 +0000
Subject: Re: [PHP4BETA] PHP3 outperforms PHP4... :-)
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-82@lists.php.net to get a copy of this message
Zeev Suraski schrieb: > What are we seeing here? I can't make anything of it. We are seeing that is it possible to construct a pathological case, in which a (trivial and useless) script is being executed faster by PHP3 than by PHP4. That script is very long (in the example quoted ~170 KB) and thus takes quite some time to compile. Also, it does not contain any constructs in which Zend can play its strengths (no loops, for example), so the compilation overhead outweighs the performance advantage. I wrote these scripts originally to test PHP4 with a large number of different classes and objects (1024 different classes, each with a single instance), with very large objects (one class with 1024 slots and 1024 methods) and with a large number of functions (1024 functions with a single static variable). All of these test cases caused PHP4 to consume very large amounts of memory, which was fixed immediately by Andi by changing some compile time constant. The result of that change was that PHP4 performance improved considerably and PHP4 was almost as fast as PHP3. Kristian -- Kristian Köhntopp, NetUSE Kommunikationstechnologie GmbH Siemenswall, D-24107 Kiel, Germany, +49 431 386 436 00 Using PHP3? See our web development library at http://phplib.shonline.de/ (GPL) -- PHP 4 Beta

« previous php.version4 (#82) next »