reported from a PHP user: PHP (interpreted code) is much slower than compiled code (COM). Especially when all of my PHP code is OO. The Object-Oriented version of the PHP code is about 3 times slower than the shorter procedural version. I can write a simple PHP script and achieve 8000+ hits, but change it to Object-Oriented code and it achieves 1000-2000 hits. By porting a PHP library to a COM object I improved performance (of the OO-PHP code) from under 1800 hits at 8 threads to over 3800 to 8600 hits at 8 threads stress level.
December 20th, 2001 at 10:40 pm
Wow, that\’s very useful information indeed. I am working on a commercial PHP application that uses classes extensively as you show in your article. It is much slower than my normal procedural code and I noticed this straight away. Interesting ..