Quercus (PHP implementation in Java) is faster than the C version
Interesting piece of information from this post on PushToTest :
Caucho told developers that they are seeing an astonishing 4 to 6 times performance improvement over the C-version of PHP. Quercus runs with JVM thread safety - something not available to PHP developers today - to enable things like database connection pooling in a threaded environment. Quercus is expected to ship by December 2006.
Here is another mention of this information on ServerSide :
Apparently, the PHP pages are compiled in the background to byte-code, and the resulting performance is six times that of Apache mod_php!
And this post is generating quite a few comments.
A more definitive source of information is available on the caucho forum where some actual numbers have been posted :
| Test Name | Resin/Quercus | Apache 2.0/PHP 5.0 |
|---|---|---|
| file_1k | 6341 ops | 3255 ops |
| file_1k (10 clients, 16 keepalive) | 13186 ops | 6154 ops |
| file_64k | 857 ops | 841 ops |
| file_64k (10 clients, 16 keepalive) | 1019 ops | 995 ops |
| file_7m | 10.7 ops | 11.8 ops |
| jsp_1k | 7070 ops | n/a |
| gzip_1k | 2570 ops | n/a |
| gzip_1k (cache ) | 6529 ops | n/a |
| gzip_64k | 343 ops | n/a |
| gzip_64k (cache) | 6220 ops | n/a |
| ssl_1k | 173 ops | n/a |
| ssl_1k (10 clients, 16 keepalive) | 1795 ops | n/a |
| ssl_64k | 85 ops | n/a |
| ssl_64k (10 clients, 16 keepalive> | 155 ops | n/a |
| php_1k | 4194 ops | 1151 ops |
| php_1k (10 clients, 16 keepalive) | 7806 ops | 1508 ops |
| mediawiki | 17 ops | 5 ops |
| mediawiki (10 clients, 16 keepalive) | 17 ops | 5 ops |
| mediawiki (proxy cache) | 3546 ops | 5 ops |
| drupal | 33 ops | 10 ops |
| drupal (10 clients, 16 keepalive) | 30 ops | 10 ops |
and, with PHP acceleration :
| Test | Resin/Quercus | Apache/PHP/eaccelerator |
|---|---|---|
| drupal | 46 ops | 43 ops |
| wiki | 30 ops | 17 ops |
With more tuning, the PHP performance might match the Resin/Quercus ones, but it should be a wake up call to all the Java detractors. Java IS NOT SLOW !
