Chapter 19. Synthetic Benchmarks: Evaluating Code Blocks and Functions
Chapter 18, “Profiling,” describes benchmarking entire applications. This is useful for doing comparative analysis between Web pages to identify slow pages and for measuring the effects of application tuning. Similar techniques are useful for evaluating the differences such as the following between different code blocks:
while()faster or slower than
strstr()for matching characters at the beginning of a string?
You could go online and search the PHP general archives to look for the answers, or you could pick up a book (like this one) for some sage advice on the subject, but neither of these methods is really sufficient. One of PHP’s ...