Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I guess consensus is that V8 has come closest?

V8 better than the JVM? Insanity, maybe it can come to within an order of magnitude in terms of performance.



Comes closest to realizing the concept of a JIT that is better than AOT.


I think that's completely silly framing; you can AOT compile any code better—or at least, just as well—if you already know how you want it to perform at runtime. Any efficiency gain would necessarily need to be in the context of total productivity.


> I think that's completely silly framing

It's literally the framing of the linked article though, which takes as a prior that JIT compilers are already ahead of AoT toolchains. And... they aren't!


They are comparing Javascript JIT to Javascript AOT, to avoid the issue of language design.

"The fastest contemporary JavaScript implementations use JIT compilers [27]. ... However, JIT compilers may not be desirable or simply not available in some contexts, for instance if programs are to be executed on platforms with too limited resources or if the architecture forbids dynamic code generation. Ahead of time (AoT) compilers offer a response to these situations.

Hopc [25] is an AoT JavaScript-to-C compiler. Its performance is often in the same range as that of the fastest JIT compilers but its impossibility to adapt the code executed at runtime seems a handicap for some patterns and benchmarks [27]."

In the context of JS it's reasonable to think that JIT may have an advantage, as the language is difficult to statically analyse.


> This gives them an advantage when compared to Ahead-of-Time (AoT) compilers that must choose the code to generate once for all.

I assumed they were talking about the general case, which is nearly useless to discuss. I just kind of filtered it out as internecine bickering amongst academics. The actual data are still interesting tho.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: