It's kind of subjective, but I'm having troubles getting LLVM JIT up to speed. Jitting large bodies of code take 50 times as much time as just interpreting them even with lazy compilation turned on.
So I was wondering how can I speeding jitting up, what kind of settings I can use?
Any other recommendations?
I am sorry to say that LLVM just isn't very fast as a JIT compiler, it is better as a AOT/static compiler.
I have run into the same speed issues in my llvm-lua project. What I did was to disable JIT compiling of large Lua functions. llvm-lua doesn't have lazy-compilation support turned on since LLVM requires too much C-stack space to run from Lua coroutines.
Also if you use this in your program's main() function:
llvm::cl::ParseCommandLineOptions(argc, argv, 0, true);
It will expose alot of command-line options from LLVM like '-time-passes' which will enable timing of LLVM passes, to see which parts of the JIT compiling is taking the most time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With