kenjis / php-framework-benchmark

PHP Framework Benchmark
1.03k stars 204 forks source link

Separate php.ini for phalcon? #8

Open TRPB opened 9 years ago

TRPB commented 9 years ago

It's not clear from the code here whether or not you used a specific php.ini that loads phalcon.so for the non-phalcon benchmarks. Loading a blank page with phalcon.so has a non-trivial overhead over a blank page without phalcon.so being loaded. As such, the non-phalcon benchmarks should all make sure that phalcon is not being loaded when they're run.

You may have done this but it's not clear.

kenjis commented 9 years ago

Thank you for your comment.

I did not. https://github.com/kenjis/php-framework-benchmark/blob/master/setup.sh is all I ran.

I didn't know phalcon.so overhead is so big, but you are probably true.

But It is not a problem to me, because I accept the cost. Because I may use phalcon class in other frameworks.

I ran with and without phalcon.so. The overhead is about 10%?

w/z phalcon.so

framework requests per second relative peak memory relative
codeigniter-3.0 693.24 16.7 0.50 1.0
slim-2.6 725.55 17.5 0.50 1.0
yii-2.0 385.49 9.3 1.50 3.0
fuel-1.8-dev 294.12 7.1 0.75 1.5
silex-1.2 349.25 8.4 1.00 2.0
bear-1.0 328.41 7.9 1.00 2.0
cake-3.0 249.54 6.0 1.00 2.0
symfony-2.6 246.28 5.9 1.00 2.0
laravel-5.0 80.08 1.9 2.75 5.5
zf-2.4 69.69 1.7 2.25 4.5
typo3-flow-2.3 41.46 1.0 5.25 10.5

w/o phalcon.so

framework requests per second relative peak memory relative
codeigniter-3.0 728.09 16.4 0.50 0.0
slim-2.6 794.40 17.9 0.50 0.0
yii-2.0 413.65 9.3 1.50 0.0
fuel-1.8-dev 314.51 7.1 0.75 0.0
silex-1.2 367.80 8.3 1.00 0.0
bear-1.0 369.46 8.3 1.00 0.0
cake-3.0 270.94 6.1 1.00 0.0
symfony-2.6 303.39 6.8 1.00 0.0
laravel-5.0 81.32 1.8 2.75 0.0
zf-2.4 69.84 1.6 2.25 0.0
typo3-flow-2.3 44.33 1.0 5.25 0.0
kenjis commented 9 years ago

For the time being, I added the note: https://github.com/kenjis/php-framework-benchmark/commit/bacf40b3980ccc1efb234ac44ecf10fd1f5f89b8