4 ms·
Raw PHP (with no framework, no ORM) does well in the 20 query test, but unfortunately you have to go down pretty far before any of the PHP frameworks show up on
by krg 13y ago
Raw PHP (with no framework, no ORM) does well in the 20 query test, but unfortunately you have to go down pretty far before any of the PHP frameworks show up on that list.
If I filter to just show PHP, the 20 query test shows that the first framework is less than 50% the performance of raw PHP.
- showerst 13y agoLooking into the code, the raw PHP is using PDO with persistent connections, and I'm not sure that's turned on in any of the frameworks. It looks like it's off by default in Redbean at least. No idea if this makes a big difference, I haven't had time to try it out.
- Joeri 13y agoYes, it does look like none of the frameworks are using persistent connections, which would explain the horrible performance. To be fair though, it is still a valid measurement if the frameworks don't enable persistent connections by default.
- Schlaefer 13y ago> it is still a valid measurement if the frameworks don't enable persistent connections by default I don't agree. Frameworks often prefer the "safe" option over "performance" by default. If you activate persistent connections by raw coding it [1] then you should also set an absolutely obvious database configuration flag like [2] in a framework. --- [1] https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/php/dbraw.php#L9 https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast... [2] https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/cake/app/Config/database.php#L64 https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...