I have created two benchmark pages using Slim and Silex micro frameworks, then tested them for speed.
Chrome Developer Tools result:
Slim: 7ms
Silex: 16ms
ApacheBench result:
# Slim
$ ab -n 1 -c 1 'http://localhost/webapps/FrameworksBenchmarking/Slim/data/123'
> 5.008 seconds
# Silex
ab -n 1 -c 1 'http://localhost/webapps/FrameworksBenchmarking/Silex/data/123'
> 0.001 seconds
I don't understand what makes ab so slow with Slim. Any ideas on this issue?
PS as you can see, there's no problem requesting page in browser. Also, it's fast with curl.
Do you use PHP Accelerator? Have you warmed up everything before benchmarking? -n 1 -c 1 doesn't seem sufficient to provide any accurate statistics. Try to increase a number of repetitions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With