Using Codebench
The contents of this page are taken (with some minor changes) fromhttp://www.geertdedeckere.be/article/introducing-codebench and are copyright Geert De Deckere.
For a long time I have been using a quick-and-dirty
benchmark.php
file to optimize bits of PHP code, many times regex-related stuff. The file contained not much more than a gettimeofday function wrapped around a for
loop. It worked, albeit not very efficiently. Something more solid was needed. I set out to create a far more usable piece of software to aid in the everlasting quest to squeeze every millisecond out of those regular expressions.