Hacker News new | ask | show | jobs
by rurban 3307 days ago
php7 was threatened by hhvm and was completely rewritten by keeping backcompat. It's now the fastest major old scripting language. js and luajit are in the very fast ballpark, php in the middle and the other 3 far behind.

PHP also has the best language features and IDE integrations, the only remaining problem is the legacy stdlib and devbase. Ruby with an inliner and method cache would catch up, but I don't see it happen. Python is doomed by its architecture. Perl has a faster interpreter loop, but data structure bloat and similar dev problems as the other 2.

1 comments

Pypy is considerably faster than CPython, so I don't think Python is doomed to be slower?
pypy changed not only the vm, but also the internal data structures. It's totally different. pypy's problem is that is only optimizes loops and often called functions, not the general interpretation, as e.g. PHP7 or lua did. For normal, simple small scripts it's not that big a benefit, and you loose all the extensions, (though that's being worked on).
That has been less true for the last few years: C extensions are still a concern, although many of the major ones work now, but I've had a significant number of programs run faster simply by using pypy. It's a full JIT compiler and one nice area that improves is regex handling so all of my log-related work got faster with zero effort.