Can anybody provide some data showing the performance of code output by llvm's JIT, say compared to static compilation with -O3? It is better that such performance is illustrated by spec benchmark. People say code output by JIT is slow. I am just curious how slow it is.
Asked
Active
Viewed 4,696 times
12
-
1Have you ... tried it? I mean how hard is it to download [a benchmark suite](http://www.netlib.org/benchmark/dhry-c) and compile it once with GCC and once with Clang to see what the difference might be? – JUST MY correct OPINION Jan 14 '11 at 04:50
-
3Trying it myself is of course an option. But I don't think the evaluation of a whole benchmark is an easy job, especially when I am not familiar with the jit compilation of llvm. I guess somebody has done it, and I just would like to know the result. – dalibocai Jan 14 '11 at 16:07
-
1Are you asking about the performance of JIT *itself* (as in, how long does it take to do the just-in-time compilation), or the performance of the generated code? – Daniel Dunbar Jan 23 '11 at 17:12
-
1I meant the performance of the generated code. – dalibocai Jan 25 '11 at 22:02
1 Answers
6
Give this presentation a read, it covers benchmarks of the JIT generated code (for a JVM & .Net though, unfortunately, most benchmarks will for existing languages with a new JIT backend, such as Rubinius). There are also a few interesting graphs here.
As an added bonus, here is a presentation on building an efficient JIT with LLVM and Clang that covers memory usage and speed benchmarks of the JITing process, which can affect the speed and quality of generated code, if you do decide to create your own benchmarks.
However, you might find this question interesting as well.