4 ms·
> I don't think anyone would pick PHP purely on the basis of speed, again, there are many languages that are faster. When it comes to interpreted languages (pe
by datalopers 4y ago
> I don't think anyone would pick PHP purely on the basis of speed, again, there are many languages that are faster.
When it comes to interpreted languages (perl, python, ruby, js), PHP is hands down the fastest.
- piperswe 4y agoYou mention JS - I would be interested in seeing any benchmarks where the PHP interpreter beats V8.
- datalopers 4y agoThese are web frameworks specifically but a good broad suite of examples: https://www.techempower.com/benchmarks/#section=data-r21&l=zij5z3-6bj https://www.techempower.com/benchmarks/#section=data-r21&l=z... An amazingly fast specialized JS runtime solution [1][2] does indeed have the #1 spot on the most recent rounds, but full PHP frameworks hold spots #2 - 29 and then it's a mixture of PHP and JS all the way to #58 before we see the first other language (python, uvicorn) emerge. [1] https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks/JavaScript/just https://github.com/TechEmpower/FrameworkBenchmarks/tree/mast... [2] https://github.com/just-js https://github.com/just-js
- larve 4y agoYou can also do some pretty "fun" things with PHP leveraging the opcache. I wrote what in my own personal biased benchmark was the fastest mustache template renderer by transpiling mustache to php files and then "compiling" them with apc [1]. Kind of a poor man's staging / partial evaluation optimizer. This is still running https://goldeneaglecoin.com/ https://goldeneaglecoin.com/ whose framework (and HTML/CSS) is pretty much untouched since 2011. It is running on an ec2 t2.medium instance and is one of the fastest e-commerce sites i know. [1] https://github.com/wesen/proust https://github.com/wesen/proust
- proton_9 4y agowow, that was some incredible performance, never thought php could be this fast, I was in a dilemma on what language to focus on as an ordinary dev, think I'll stick with php for a while longer.