From: Libor S. <li...@gm...> - 2008-07-13 11:50:34
|
On Sun, 13 Jul 2008 12:29:12 +0100, Albert Graef <Dr....@t-...> wrote: > This example clearly shows that there are some severe performance > bottlenecks in the JIT (even in LLVM 2.3). The JIT doesn't scale well > with code size at all. For the example at hand, on my system assigning a > 1000 element list to a variable needs 0.82s from which 0.01s are spent > in IR code generation including all optimization passes, 0.81s in the > JIT(!), and 0.00s (zilch, up to rounding) in actually executing the > code. I got these figures using clock(), so they should be pretty accurate. Nice work! Incidentally, I find clock() to be a pretty blunt tool with its resolution of 10ms, which is way too long timelapse to measure most executions on modern machines, apart from pretty massive tasks. For example, in real-time image processing, you would process a whole image in no more than five ticks of the clock(). gettimeofday is a lot more accurate but measures the elapsed time. I am not even sure if clock() internally does any rounding, from what I can see it is just a discrete counter running in 10ms units, meaning that CPU time of as much as 9ms can register as 0 (zilch). L. |