Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000123 [3. XAMPP for MacOS X] PHP5 minor always 2009-07-31 18:46 2009-09-26 00:46
Reporter anonova View Status public  
Assigned To kleinweby
Priority normal Resolution open  
Status assigned   Product Version 1.0.1
Summary 0000123: XAMPP PHP build executing slowly
Description This report is in response to kleinweby in the forum topic XAMPP 1.0.1, slow PHP execution times <http://www.apachefriends.org/f/viewtopic.php?f=29&t=36481>. [^]

For some reason, the XAMPP PHP build is executing slowly. Here is a more thorough test and the results. XAMPP is performing almost twice as slow as the built in OSX build and MAMP. I'm not sure why the Linux build is twice as fast.

<code>
<?php
    $start = microtime(true);
    
    for ($i = 0; $i < 1E6; $i++) {
        hash('sha512', 'The quick brown fox jumped over the lazy dog.');
    }
    for ($j = 0; $j < 1E6; $j++) {
        $object = new StdClass();
        $object->sentence = 'The quick brown fox jumped over the lazy dog.';
    }
    for ($k = 0; $k < 1E6; $k++) {
        $lim = sqrt($k);
        for ($d = 2; $d <= $lim; $d++) {
            if ($k % $d == 0) {
                break;
            }
        }
    }
    
    echo ((microtime(true) - $start) * 1000).' ms'.PHP_EOL;
?>
</code>

<code>
# (MAMP/OS X) PHP 5.2.5 (cli) (built: Nov 29 2007 09:31:38)
$ time /Applications/MAMP/bin/php5/bin/php test.php
23895.4799175 ms

real 0m23.933s
user 0m21.549s
sys 0m1.866s

# (OS X) PHP 5.2.8 (cli) (built: Feb 5 2009 21:21:13)
$ time php test.php
25328.186035156 ms

real 0m25.361s
user 0m22.858s
sys 0m1.911s

# (XAMPP/OS X) PHP 5.2.9 (cli) (built: Apr 12 2009 21:47:42)
$ time /Applications/XAMPP/xamppfiles/bin/php test.php
39661.9110107 ms

real 0m39.952s
user 0m36.677s
sys 0m2.055s

# (Arch Linux) PHP 5.2.10 with Suhosin-Patch 0.9.7 (cli) (built: Jul 14 2009 11:23:14)
$ time php test.php
13786.695957184 ms

real 0m13.805s
user 0m13.776s
sys 0m0.003s
</code>
Additional Information Mac OS X (10.5.7)
4 GB 677 MHz DDR2 SDRAM

Arch Linux 2009.07
256 MB RAM
running in VMware Fusion on the same machine
Tags No tags attached.
Processor (Mac) Intel
Attached Files

- Relationships

-  Notes
(0000218)
anonova (reporter)
2009-09-26 00:46

Same hardware and test script as above. OSX 10.5.8. Not too bad now it seems, but still, what's up with that Linux execution time?

# (OS X) PHP 5.2.10 (cli) (built: Aug 24 2009 12:47:12)
$ time php test.php
25322.370767593 ms

real 0m25.354s
user 0m23.164s
sys 0m1.912s

# (XAMPP 1.7.2a/OSX) PHP 5.3.0 (cli) (built: Jul 31 2009 16:39:26)
$ time /Applications/XAMPP/xamppfiles/bin/php test.php
27668.3130264 ms

real 0m27.738s
user 0m27.372s
sys 0m0.141s

# (Arch Linux) PHP 5.3.0 with Suhosin-Patch (cli) (built: Sep 16 2009 13:53:36)
$ time php test.php
9259.2899799347 ms

real 0m9.290s
user 0m9.106s
sys 0m0.013s

- Issue History
Date Modified Username Field Change
2009-07-31 18:46 anonova New Issue
2009-07-31 18:46 anonova Processor (Mac) => Intel
2009-07-31 19:27 kleinweby Status new => assigned
2009-07-31 19:27 kleinweby Assigned To => kleinweby
2009-09-26 00:46 anonova Note Added: 0000218


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker