4 ms·
Strongly agree with the premise, but > it just isn’t possible for a highly dynamic language like JavaScript to run as fast as the C++ code in browsers With mo
by saagarjha 7y ago
Strongly agree with the premise, but
> it just isn’t possible for a highly dynamic language like JavaScript to run as fast as the C++ code in browsers
With modern tracing JITs, this isn’t always true ;)
- kevingadd 7y agoAs far as I know, no production browser uses tracing anymore. The only modern tracing implementation I'm aware of is LuaJIT.
- saagarjha 7y agoYes, most browsers have moved away from tracing JITs, but I think PyPy still uses it in addition to LuaJIT. The reason I brought it up was because tracing JITs, as far as I am aware, can give very good performance in the best case where your trace actually works (which is of course a bit of a dirty trick, but when you're up against C++ it's hard to play fair…)
- zucker42 7y agoDo you know why browsers moved away from tracing JIT?
- saagarjha 7y agoWell, one reason is probably because they don’t perform well on programs that cannot trace well.
- deleted 7y ago[deleted]