By: x (x.delete@this.example.com), July 15, 2013 5:43 am
Room: Moderated Discussions
> That's no fairy tail. The only thing that can beat static compilation is runtime code
> specialization. The main problem is the high complexity of such a JIT compiler.
Yes, but in practice, outside of speeding up ill-designed languages (the so-called "dynamic" languages, perhaps better described as "crippled typing" languages), runtime code specialization is not necessarily possible and isn't likely to be worth the effort and risk of slowdown due to compilation time, executing checks and explosion of memory usage.
It's generally much better to do it manually if and when needed either statically with C++ templates or similar, or dynamically by explicitly invoking a code generator (e.g. LLVM) at runtime.
> specialization. The main problem is the high complexity of such a JIT compiler.
Yes, but in practice, outside of speeding up ill-designed languages (the so-called "dynamic" languages, perhaps better described as "crippled typing" languages), runtime code specialization is not necessarily possible and isn't likely to be worth the effort and risk of slowdown due to compilation time, executing checks and explosion of memory usage.
It's generally much better to do it manually if and when needed either statically with C++ templates or similar, or dynamically by explicitly invoking a code generator (e.g. LLVM) at runtime.