Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LLVM JIT speed up choices?

Tags:

jit

llvm

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?

like image 512
vava Avatar asked Nov 02 '10 12:11

vava


1 Answers

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.

like image 119
Neopallium Avatar answered Sep 29 '22 17:09

Neopallium