5 ms·
There is a huge difference between raw PHP and CakePHP. I'd be curious to see other PHP frameworks (such as Zend, or Slim) in there-- is Cake just particularly
by krg 14y ago
There is a huge difference between raw PHP and CakePHP. I'd be curious to see other PHP frameworks (such as Zend, or Slim) in there-- is Cake just particularly slow, or is that simply what happens when you have a PHP framework?
- insraq 14y agoPer my experience, CakePHP is probably one of the slowest PHP frameworks. It has a large overhead and lots of legacy code that slows down the whole system. Generally, frameworks targeted at PHP 5.3+ are faster. PHP 5.4 has further performance boost in production and PHP 5.5 has Zend Optimizer built-in, which suppose to further speed up but I have never try that in production.
- Schlaefer 14y agoCakePHP is always at the bottom end of these "framework performance" tests even when comparing PHP only. It's the everything but the kitchen sink of PHP frameworks with bells and whistles never used by these "hello world" performance tests. Just the wrong tool for the job if you want to spill out some js.
- Joeri 14y agoI'm curious if they configured php with apc or zend optimizer. The huge difference is easy to explain as parse overhead for the framework's code, which happens on each request if you're not using a bytecode cache.
- pekk 14y agoThe relation of PHP to everything else in this benchmark is so unusual among benchmarks, that I strongly suspect a failure of parity with other configurations. Hopefully that is unintentional.
- beryllium 14y agoYep, this is exactly what I was wondering. Opcode caching is a key part of production PHP environments - in this case, since the code isn't changing, they should even disable the "change check" (apc.stat=0) as one would do in a production environment. And if this is the case with their configuration of PHP, it makes me wonder what other platforms are not configured for production in this benchmark :)
- bsingh4 14y agoAlso, it would be beneficial to see Phalcon PHP - its implemented as a C extension so should theoretically be faster. http://phalconphp.com http://phalconphp.com.
- Joeri 14y agoIf we're going that route, the fastest php performance you would probably get from facebook's HHVM JIT compiling php engine: https://github.com/facebook/hiphop-php https://github.com/facebook/hiphop-php It's no accident that zend optimizer (bytecode cache) is being bundled into php 5.5 as open source, as mere bytecode caching is now not fast enough to charge money for when hhvm is open source. I expect the next version of zend's commercial php server product to contain a JIT engine to match what hhvm can do.
- aleem 14y agoThat would certainly be very interesting, especially as PHP is being nudged into that area (Twig also now offers a c-module). I really hope the author picks up on this and compares it. It could provide some tremendous insights into pushing PHP further into this space.