PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Date and Time » Date » Bug #9664

Date() low performance

Details

Submitted2006-12-20 13:50 UTC
Fromjuancarlos at ackstorm dot es
StatusSuspended
PackageDate
PHP Version5.2.0
OSDebian 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