Comment by igouy
3 days ago
fwiw There are a few naive un-optimised single-thread #8 n-body programs transliterated line-by-line literal style into different programming languages from the same original. [1]
> 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
> By which you mean < 10× ?
Yup
> So not those Java -Xint, PHP, Ruby, Python 3 programs?
Pretty much. The Java -Xint stuff turns off the JIT and purely uses the interpreter. That's not how anyone (that I'm aware of) uses java. I had to look up exactly what that flag did.
Ruby I think might be underperforming because `yjit` isn't enabled by default. I suspect the same of Python (it just got a jit with python 3.13. Looks like it's still marked as experimental)
`yjit` was enabled explicitly.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
> Let me specify that what I'm calling interpreted…
Is everything except native aot compilers.