News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Larry Garfield's Blog:
Benchmarking magic
November 08, 2007 @ 12:04:00

Larry Garfield has put together some benchmarks based around a request he had from other developers (the "performance czars") as to how the magic functions in PHP5 would perform in the new environment.

Already, there is talk of how, and if, to leverage PHP 5's object handling now that we don't need to deal with the weirdness of PHP 4's object model. Of course, because it's Drupal, our army of performance czars want to know just what the cost is for object handling, and especially advanced object magic like __get(), __call(), the ArrayAccess interface, and so forth.

He an his tests on a Thinkpad (Intel Core2 Duo 2.2Ghz) running Kubuntu and PHP 5.2.3. They were run two million times benchmarking the different methods for:

  • function calls
  • __call
  • __get
  • __set
  • iterators (array)
  • inheritance
  • composition

His results are listed at the end of the post.

0 comments voice your opinion now!
benchmark magic function get set call iterator inheritance composition benchmark magic function get set call iterator inheritance composition


blog comments powered by Disqus

Similar Posts

DZone.com: All the ways to perform HTTP requests in PHP

Paul Jones' Blog: PHP Framework Benchmarks on Github

Michael Bommarito\'s Blog: Day Three - PHP5 vs PHP6 Benchmark

Chris Hartjes' Blog: The Story and Rebirth Of Zend_Service_Audioscrobbler, Part 2

PHPMaster.com: Reusing Implementation - a Walk-through of Inheritance, Composition, and Delegation


Community Events





Don't see your event here?
Let us know!


unittest release community list opinion refactor testing wordpress threedevsandamaybe series introduction install language code framework interview laravel podcast api developer

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework