Home » Date and Time » Date » Bug #9664
Date() low performance
Details
| Submitted | 2006-12-20 13:50 UTC |
|---|---|
| From | juancarlos at ackstorm dot es |
| Status | Suspended |
| Package | Date |
| PHP Version | 5.2.0 |
| OS | Debian GNU/Linux 4.0 |
| Roadmaps | (Not assigned) |
Comments
[2006-12-20 13:50 UTC] juancarlos at ackstorm dot es
Description:
------------
Hi,
I'm doing a performance test over a customer application, and I found that there was a problem with Date() function.
I show you some quick performance test:
date1.php:
<?
$today = getdate();
?>
date2.php:
<?
require_once "Date.php";
$date= new Date();
?>
performance for date1.php:
Total: connections 10000 requests 10000 replies 10000 test-duration 5.807 s
Request rate: 1722.1 req/s (0.6 ms/req)
Request size [B]: 69.0
performance for date2.php:
Total: connections 10000 requests 10000 replies 10000 test-duration 256.317 s
Connection rate: 39.0 conn/s (25.6 ms/conn, <=1 concurrent connections)
Request rate: 39.0 req/s (25.6 ms/req)
Request size [B]: 69.0
getdate() is 44,13 times faster.
Best Regards
Juan Carlos Moreno
http://www.ackstorm.es