4 ms·
Sorry, I should have been clearer: I meant that it's had the most manpower dedicated to optimising it, not that it's necessarily the most optimal. It's hard to
by samhw 5y ago
Sorry, I should have been clearer: I meant that it's had the most manpower dedicated to optimising it, not that it's necessarily the most optimal. It's hard to make apples-to-apples comparisons in that respect, given the significant differences between different language specifications. (For instance, it's hard for anyone to write a reference-compliant interpreter for Python which is as fast as the interpreter they could write for, say, Ada or Haskell.)
- danachow 5y agoWell you did say: “ NodeJS relies on V8, which is perhaps the world's most highly optimised interpreter (/JIT compiler/runner)” But even in manpower this is pretty hyperbolic compared to Java and .NET. There was probably more manpower in even some of the third party Java runtimes like Azul.
- samhw 5y ago> Well you did say: "NodeJS relies on V8, which is perhaps the world's most highly optimised interpreter (/JIT compiler/runner)" Yes, and that's exactly what I meant. It's undergone the most optimisation. That doesn't mean the result will necessarily be more performant than some other interpreter for a different language which is simpler to interpret. By that logic, I could write an 'x86 interpreter' which would blow LuaJIT out of the water... > But even in manpower this is pretty hyperbolic compared to Java and .NET. I wasn't including Java because it's not strictly an interpreted language, though I admit you could write a whole book about the philosophical differences between V8's abstract machine vs Java's bytecode VM. .NET I don't know so much about. As far as I'm aware, .NET hasn't had as much manpower invested, though Java has & would certainly beat V8 if you included it.
- yccs27 5y agoThat is precisely the point jvanderbot made: nodejs has less-than-optimal performance, and not for lack of trying to improve it. Its hard to write fast implementations of js or python, so they should not be used where speed matters.
- samhw 5y ago> nodejs has less-than-optimal performance, and not for lack of trying to improve it I think you mean "less-than-C" performance, no? I'd say it's pretty close to optimal performance - it's just that the optimum is not that high compared with a stricter language, or indeed a compiled language, which are able to exploit far more invariants (especially in the latter case). Anyway, I think his point was fundamentally correct, but it just seemed like an odd choice to single out one of the world's best interpreters - and one which is fairly competitive even with fast compiled languages - as your example. If he'd chosen CPython, I'd have been with him all the way, haha. (As someone who's written a faster Python interpreter, ...don't even get me started on that one.)