4 ms·
The point of a JIT is to optimize code that is, roughly, the largest percentage of program time. Most programs follow a power distribution where there is some v
by chc4 2y ago
The point of a JIT is to optimize code that is, roughly, the largest percentage of program time. Most programs follow a power distribution where there is some very important code that is ran a lot, with a lot of code that isn't ran very often (or worse, only ever once). If you JIT compile the N highest impact parts of the code, then you get the highest impact without actually needing to process that much code - which is extremely important, because the act of JIT compiling is very slow and only should be done when it's likely profitable in terms of execution time to waste so many cycles compiling code, with the expectation that you will make it back by making it N cycles faster every time it runs in the future.