Re: [PHP4BETA] It's not the integers, it's the functions...
| From: | Andi Gutmans | Date: | Fri, 09 Apr 1999 16:34:09 +0000 |
| Subject: | Re: [PHP4BETA] It's not the integers, it's the functions... | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-55@lists.php.net to get a copy of this message | ||
zend_compile.h:#define INITIAL_OP_ARRAY_SIZE 1024
Try and edit this and change OP_ARRAY_SIZE to something much smaller, maybe
10.
See if it changes things drastically.
Andi
At 15:15 09/04/99 +0200, Kristian Köhntopp wrote:
>
>This one performs well:
>
>kk@poe /tmp/y $ cat bla3.pl
>#! /opt/bin/perl --
>
>$stop = 1024;
>
>print "<?php
>";
>
>for ($i=0; $i<$stop; $i++) {
> print "\$v$i = $i;\n";
>}
>
>for ($i=0; $i<$stop; $i++) {
> print qq(echo "\$v$i\\n";\n);
>}
>
>print "\n?>\n";
>kk@poe /tmp/y $ time ~kk/php4/php p3.out > /dev/null
>
>real 0m1.180s
>user 0m0.512s
>sys 0m0.196s
>
> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU
>COMMAND
>26400 kk -25 0 2820K 2016K run 0:00 2.30% 2.30%
>php
>
>
>That one is again at 42M:
>
>kk@poe /tmp/y $ cat bla4.pl
>#! /opt/bin/perl --
>
>$stop = 1024;
>
>print "<?php
>";
>
>for ($i=0; $i<$stop; $i++) {
> print qq(
>function f$i(\$p = $i) {
> static \$s = $i;
>
> printf("parameter is %s, static is %s\\n", \$p, \$s);
>}
>);
>}
>
>for ($i=0; $i<$stop; $i++) {
> print qq(f$i();\n);
>}
>
>print "\n?>\n";
>kk@poe /tmp/y $ perl bla4.pl >p4.out
>kk@poe /tmp/y $ time ~kk/php4/php p4.out > /dev/null
>
>real 0m56.019s
>user 0m3.653s
>sys 0m11.815s
>
>
> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU
>COMMAND
>26656 kk -25 0 92M 42M run 0:10 5.84% 37.58%
>php
>
>
>--
>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
>
>
>
---
Andi Gutmans <andi@zend.com>
ICQ: 1568297
PGP: finger andi@vipe.technion.ac.il
--
PHP 4 Beta