4 ms·
"You may think PHP is slow" Why would we think php is slow? PHP is blazing fast certain applications (looking at you sugarcrm) make this into a mockery by rew
by wolco 8y ago
"You may think PHP is slow"
Why would we think php is slow? PHP is blazing fast certain applications (looking at you sugarcrm) make this into a mockery by rewriting queries and loading unnecessary data into each page request.
Nice to see a php related show and tell.
- bufferoverflow 8y agoPHP used to be very slow, it got better with v7.0. It's still quite slow compared to C/C++/Rust/Go, more than 10x slower: https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/fasta.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- sieabahlpark 8y agoAn interpreted language is slower than a compiled binary? Color me shocked.
- hk__2 8y ago> An interpreted language is slower than a compiled binary? Color me shocked. That same benchmark shows JS code that’s 6x faster than PHP.
- barrkel 8y agoYes, but JS is faster than Ruby and Python, and indeed most of your go-to scripting options.
- anonytrary 8y agoJS has the advantage of being the thing that makes your website run faster on the screen of the user whose clicks are earning you ad dollars. JS is in a good spot.
- bufferoverflow 8y agoPHP is JIT-compiled, which helps.
- NVRM 8y agoNot always! https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/regexredux.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- igouy 8y agoFurthermore ;-) https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/regexredux-cpu.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- igouy 8y agoJust curious - why did you choose fasta as your comparison?
- jonknee 8y agoBecause for a long time (critically, when PHP was very popular) it was quite slow. It has gotten better, but a lot of people haven't used it since it was slow.
- jack9 8y agoQuite slow compared to what? PHP was popular when it had MySQL bindings that were always up to date with MySQL changes and apache PHP setup was simplistic. Thus the LAMP stack, right? It has always been rather fast, in the larger ecosystem of web scripting languages (especially if you avoided particular BIFs) but it got a LOT faster in 7 as the slowest bits were optimized alongside everything else.