[LLVMdev] Why the same code is much slower in JIT compared to separate executable?

Óscar Fuentes ofv at wanadoo.es
Thu Apr 29 12:32:35 PDT 2010


Yuri <yuri at tsoft.com> writes:

> Török Edwin wrote:
>> Are you using 2.6 or 2.7, 32-bit or 64-bit?
>>   
>
> I use 2.7 on i386. lli has debug asserts enabled, but I guess this 
> shouldn't matter for JIT code speed.
>
> jit: 11.32 real
> exe: 7.64 user
>
> Both have -O3 option. Speed should be the same.

With

time lli -O3 fib.bc 45

you are measuring the time lli takes optimizing the LLVM code,
generating the native code and, finally, executing it. If you add to
this the debug asserts, it is not surprising that lli ends being quite a
bit slower than directly executing the native code.

As Török suggests, using a Release build with asserts off will make a
difference on lli's speed.




More information about the llvm-dev mailing list