Performance comparison

We as developers work on many different web apps and use many different libraries and external APIs. Each and every function call slows our app, so it's important that the framework itself doesn't add much to the total response time. We've made performance benchmarks (using ApacheBench) to show you the Bear Framework's performance against other popular PHP frameworks, and we've compared the requests per second each framework can handle.

This is what we've done to make the benchmarks fair:
1. Configured each framework to output the text 'Hi'.
2. Installed each framework according to their documentation (mostly using Composer).
3. Ran --optimize-autoloader Composer command.
4. Set the environment variable to production (disabled debug mode) to all frameworks that have such option.
5. Ran the tests on AWS EC2 m3.medium (Amazon Linux AMI 2016.09.0 (HVM), SSD) with all updates installed.
6. Installed Zend OPCache, Apache 2.4.23 and PHP 5.6.25.
7. Restarted Apache before each framework benchmark.
8. Ran the benchmark twice after Apache restart and only use the second benchmark result.
9. Tested total of 1000 requests per framework, 10 at the same time.

The results

In the following chart, you can see the requests per second each framework can handle. The results for Bear Framework are great, but they are not surprising because the framework is optimized for simplicity - nothing is loaded until necessary. Even addons can't slow it down significantly, because only one file is loaded per addon, and the others when needed.

We believe Bear Framework can be your fast start and help you grow without compromising performance and developer productivity.