[LLVMdev] Very slow performance of lli on x86
Óscar Fuentes
ofv at wanadoo.es
Mon Nov 16 06:51:03 PST 2009
Prasanth J <j.prasanth.j at gmail.com>
writes:
[snip]
> FOLLOWING ARE THE STATISTICS WHILE USING LLI FOR SINGLE ITERATION*
[snip]
> real 0m0.043s
0.043 * 10000 = 430 seconds
[snip]
> Even for single iteration the time take for execution is pretty high when
> compared to gcc, llvm-gcc and clang.
> What should be the expected behavior while using lli? As per my
> understanding as lli does runtime optimizations it should be faster than
> clang and llvm-gcc. am i right?
As explained on a previous message, lli translates the llvm bitecode to
native code on each run. This is not comparable to gcc or clang, that
creates a process which you run separately.
I suspect that there are further reasons for not taking your test code
as a meaningful benchmark (it seems to execute too fast, i.e. you are
actually testing process creation performance for the clang and llvm-gcc
and gcc parts).
You can expect that as the test code grows, you will find larger
differences among code executed with lli and code which was compiled
into executable files. Not because the code generaed by lli is bad, but
because it needs to generate the code on each run.
[snip]
--
Óscar
More information about the llvm-dev
mailing list