Unserialize vs Include, with APC or php://memory

Posted by John Kleijn • Sunday, December 7. 2008 • Category: PHP

As a follow up on my previous post, I decided it would be interesting to see what effect using the php://memory wrapper or APC would have on the results.

  »
Tagged

Unserialize vs Include

Posted by John Kleijn • Sunday, December 7. 2008 • Category: PHP

Cutting straight to chase, the results:

r448191@goliath:~/bench$ php bench.php 10

Total include: 0.000389575958252

Total unserialize: 0.000274181365967

r448191@goliath:~/bench$ php bench.php 100

Total include: 0.0033860206604

Total unserialize: 0.00247645378113

r448191@goliath:~/bench$ php bench.php 1000

Total include: 0.0342044830322

Total unserialize: 0.0263719558716

r448191@goliath:~/bench$ php bench.php 10000

Total include: 0.32866358757

Total unserialize: 0.25150680542

r448191@goliath:~/bench$ php bench.php 100000

Total include: 3.23683238029

Total unserialize: 2.56990027428

  »
Tagged

Antiquities and such