Live data from Hacker News

A Deep Introduction to JIT Compilers: JITs are not very Just-in-time

carolchen.me

1–10 of 103 posts

Re: A Deep Introduction to JIT Compilers: JITs are not very Just-in-time

#4
post #2

Tl;dr: JIT is a compiler that optimuzes certain parts of code after interpreter see it as hot (e.g. was executed many time). Thank to runtime information it can occasionally exceed performance of statically compiled language.

except Julia because Julia <3

Re: A Deep Introduction to JIT Compilers: JITs are not very Just-in-time

#5
post #2

Tl;dr: JIT is a compiler that optimuzes certain parts of code after interpreter see it as hot (e.g. was executed many time). Thank to runtime information it can occasionally exceed performance of statically compiled language.

> Thank to runtime information it can occasionally exceed performance of statically compiled language.

Interestingly in 30 years I have not once heard of a case where this theoretical benefit has manifested as a clear advantage in any real world application when looking at the system as a whole... amdahls law and all that.

You can always hand tune the 1-10% hotspots for reasonable cost most of the time, and even static tools can do PGO which generally gets you where JIT would anyway.

Re: A Deep Introduction to JIT Compilers: JITs are not very Just-in-time

#6
post #4
post #2

Tl;dr: JIT is a compiler that optimuzes certain parts of code after interpreter see it as hot (e.g. was executed many time). Thank to runtime information it can occasionally exceed performance of statically compiled language.

except Julia because Julia <3

What do you mean?

Re: A Deep Introduction to JIT Compilers: JITs are not very Just-in-time

#7
post #6
post #4

Earlier quoted context omitted.

except Julia because Julia <3

What do you mean?

Julia compiles at runtime which makes it a JIT but it does not actually use runtime information to compile (except to know what to compile and maybe some other things) or have a concept of "hotness"

(this is in the post~)

Re: A Deep Introduction to JIT Compilers: JITs are not very Just-in-time

#8
post #5
post #2

Tl;dr: JIT is a compiler that optimuzes certain parts of code after interpreter see it as hot (e.g. was executed many time). Thank to runtime information it can occasionally exceed performance of statically compiled language.

> Thank to runtime information it can occasionally exceed performance of statically compiled language. Interestingly in 30 years I have not once heard of a case where this theoretical benefit has manifested as a clear advantage in any real world application when looking at the system as a whole... amdahls law and all that. You can always hand tune the 1-10% hotspots for reasonable cost most of the time, and even stat…

> in 30 years I have not once heard of a case where this theoretical benefit has manifested as a clear advantage in any real world application

Today you make make a very direct empirical comparison to see this - using the Graal compiler. This lets you compile exactly the same Java code either ahead-of-time or just-in-time, but using the same compiler logic except for the runtime information available when running just-in-time. The just-in-time code is (ignoring startup and warmup time) in my experience always faster, due to the extra runtime information.

Re: A Deep Introduction to JIT Compilers: JITs are not very Just-in-time

#10
post #9

Very nice. I just looked at the author's resume.[a] It appears she is still in, or only very recently graduated from, high school . Is that right? Impressive! [a] https://carolchen.me/

Yep, class of 2019, jit to actually have a physical prom and graduation
Post reply on HN