2 ms·
JIT compilers do a bit less optimization than rumored (of course web browsers and HotSpot do some of the heaviest.) The results have to be worth the analysis ti
by astrange 5y ago
JIT compilers do a bit less optimization than rumored (of course web browsers and HotSpot do some of the heaviest.) The results have to be worth the analysis time, which they're not, because CPUs are already extremely fast and it's memory that's slow, and JIT isn't a technique that can optimize memory layout.
- MaxBarraclough 5y ago> The results have to be worth the analysis time On modern systems it may be possible for a JIT compiler to run in the background on cores not being used by the application code. > JIT isn't a technique that can optimize memory layout As I understand it, compiler optimizations for memory layouts aren't very well researched in general. Why would the JIT model be a hindrance?
- astrange 5y ago> On modern systems it may be possible for a JIT compiler to run in the background on cores not being used by the application code. Only as long as the app itself is on-core. It's not worth running background superoptimization pretty much ever, particularly on a battery-powered device, but also in general because optimizations aren't real unless they're reliable. I've had Lisp programmers brag to me about how some implementation can spend 30 minutes optimizing, but in that case you can't tell what's going to happen to your program… > As I understand it, compiler optimizations for memory layouts aren't very well researched in general. Why would the JIT model be a hindrance? It's not a help either. Well, function specialization might be helped in some cases.