Ask HN: why is js winning the dynamic language performance race?
I've been quite surprised to see how quickly the performance of the major javascript engines has improved. It went from being a fairly slow language to a language that in its fastest implementations (v8) is significantly faster than python, ruby, perl and php. The teams working on performance for those languages don't seem to have made anything close to the same progress.
Why is this? Is JS just an easier language to optimize? Are the JS engine teams just more skilled?
(
10 comments
| 19 points
| on HN
)
It does happen that some of the most skilled virtual machine developers in the world are working on V8, for example. (Lars Bak is leading their effort, and he was one of the leads on the Self/Java Hotspot engines, having now built several generations of optimizers for dynamic languages). This is not a coincidence. ;-)
And it also happens that, until a little while back when JS performance became important, the JS engines were pretty backwater-ish, and quite slow. So it's fairly easy to make important speed gains when starting from such a lowly position.
I'm sure having somebody with Bak's experience on the job makes a big difference. The other browser JS implementations seem to be keeping pace though.
Implementing and optimizing a language are big projects. They benefit a lot from sponsors. See Sun, IBM, Microsoft, Mozilla, Google, and Opera. (I don't know of a single company which has sponsored LuaJIT, but it's worth mentioning.)
Blizzard should kick down something. They've made a fortune off lua.
Here's JavaScript V8 :: Lua http://shootout.alioth.debian.org/u32/benchmark.php?test=all...
Maybe it's a little bit like writing graphics drivers, just one of those things that only a small handful of people can really do well.
Lua has the turtle's mindset. It's gone slow and steady, and its releases are anything but frequent. However, that just goes to show how stable of a product it is.
(Considering the context, maybe a turtle wasn't the best comparison...)