5 ms·
Personally, barring any major JIT advances, I'm considering the book closed on the topic of whether JITs can take a dynamic language and make it as fast as C or
by chromatic 12y ago
Personally, barring any major JIT advances, I'm considering the book closed on the topic of whether JITs can take a dynamic language and make it as fast as C or C++.
It's possible to close more of the speed gap, but these JITs have to be able to:
* identify and use native primitives (avoid overflow and so forth)
* prefer stack allocation over heap (improved escape analysis)
* inline memory allocation and freeing and remove unused codepaths
* optimize across the boundary between implementation language and hosted language (which I believe requires self-hosting)
- sitkack 12y agoJITs are/can be faster than static code. They can make dynamic and data dependent optimizations not possible any other way.
- scrottie 12y agoI think you're fundamentally confused about how computers work. It is always faster to do things in software than in hardware. Naive optimizations are always faster than data flow analysis from profiling. More layers of indirection make things faster, so the fastest languages put interpreters inside of their interpreters. War is peace. Slavery is freedom. The kids are getting smarter.