| Let me specify that what I'm calling interpreted (and I'm sure carmack agrees) is languages with a VM and JIT. The JVM and Javascript both fall into this category. The proof is in the pudding. [1] The JS version that ran in 8.54 seconds [2] did not use any sort of fancy escape hatches to get there. It's effectively the naive solution. But if you look at the winning C version, you'll note that it went all out pulling every single SIMD trick in the book to win [3]. And with all that, the JS version is still only ~4x slower (single digit multiplier). And if you look at the C++ version which is a near direct translation [4] which isn't using all the SIMD tricks in the books to win, it ran in 5.15. Bringing the multiple down to 1.7x. Perhaps you weren't thinking of these JIT languages as being interpreted. That's fair. But if you did, you need to adjust your mental model of what's slow. JITs have come a VERY long way in the last 20 years. I will say that languages like python remain slow. That wasn't what I was thinking of when I said "interpreted". It's definitely more than fair to call it an interpreted language. [1] https://benchmarksgame-team.pages.debian.net/benchmarksgame/... [2] https://benchmarksgame-team.pages.debian.net/benchmarksgame/... [3] https://benchmarksgame-team.pages.debian.net/benchmarksgame/... [4] https://benchmarksgame-team.pages.debian.net/benchmarksgame/... |
> a single digit multiple
By which you mean < 10× ?
So not those Java -Xint, PHP, Ruby, Python 3 programs?
> interpreted
Roberto Ierusalimschy said "the distinguishing feature of interpreted languages is not that they are not compiled, but that any eventual compiler is part of the language runtime and that, therefore, it is possible (and easy) to execute code generated on the fly." [2]
[1] https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
[2] "Programming in Lua" 1st ed p57