Hacker News new | ask | show | jobs
by 082349872349872 629 days ago
Rpython and Graal (and what else?) provide JIT-for-free (or at least cheap).

Of course, this really only works for code that is (a) statically polymorphic but dynamically monomorphic, and (b) has hot loops, but qualitatively that conjunction does seem like it ought to cover a lot of low-hanging fruit.

Anyone have quantitative measures?

2 comments

There aren't many people looking at these JITs at the moment. Stefan Marr[1]'s group[2] is, I believe, the where most of the research is currently done. A recent paper[3] compares performance of interpreters in RPython and Graal. Their baseline performance is Java, and they achieve performance close to V8, which itself is about 2x slower than Java.

My summary is you can write fast interpreters + get JIT for free, but fast JIT for dynamic languages still means 2x slower than JIT for statically typed languages (and Java definitely leaves some performance on the table due to how it represents data).

[1]: https://stefan-marr.de/

[2]: https://research.kent.ac.uk/programming-languages-systems/

[3]: https://dl.acm.org/doi/10.1145/3622808

There is only so much a compiler can do when any operation can result in a complex function call or variable sized data.