ID: 14237
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Bogus
Bug Type: Performance problem
Operating System: i686-pc-linux-gnu
PHP Version: 4.1.0
New Comment:
I modified the script a bit by adding var_dump(microtime())
around the function calls. The output :
With reference:
string(21) "0.58075200 1041701482"
string(21) "0.20217700 1041701490"
Without reference:
string(21) "0.20247500 1041701490"
string(21) "0.20739800 1041701490"
as everyone may see without reference is faster as it has to be
(according to some docs). I think that there is something wrong in the
way the script computes the time.
Ooops, I found it :
$tmp = explode(' ', microtime());
$measure['Start Reference']=(double)$tmp[0] + (double)$tmp[1];
the indexes are swapped must be
$measure['Start Reference']=(double)$tmp[1] + (double)$tmp[0];
Closing this.
Previous Comments:
------------------------------------------------------------------------
[2002-01-31 05:12:55] [EMAIL PROTECTED]
I did some benchmark tests on loops and so that also delever some
strange results.
See it run at: http://phpxpath.sourceforge.net/benchmark/phpBench.php
Code at: http://phpxpath.sourceforge.net/benchmark/phpBench.php.txt
------------------------------------------------------------------------
[2001-12-13 04:47:07] [EMAIL PROTECTED]
I think, this is an very annoying behavior of the zend engine and also
there are no warning or clue in the documentation.
Someone must change it.
------------------------------------------------------------------------
[2001-12-12 20:06:28] [EMAIL PROTECTED]
That's a known issue with the current Zend Engine.
We could move it to a ZE feature request, but will it change anything
soon? I doubt ...
------------------------------------------------------------------------
[2001-12-12 19:59:37] [EMAIL PROTECTED]
PHP Version updated to 4.1.0
------------------------------------------------------------------------
[2001-12-12 19:58:57] [EMAIL PROTECTED]
Output from Linux Celeron 433/384MB/PHP 4.1.0/Apache 1.3.22.
Loopcount: 100
String size: 1048576
Time for function request "with_reference" : 1.6308959722519 secs
Time for function request "without_reference": 0.0011709928512573
secsexecution time of without_reference is 1393 times fast as
with_reference!
There must be something wrong....
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/14237
--
Edit this bug report at http://bugs.php.net/?id=14237&edit=1