[LLVMdev] Slow jitter.

Óscar Fuentes ofv at wanadoo.es
Wed Aug 26 08:07:06 PDT 2009


Albert Graef <Dr.Graef at t-online.de> writes:

> Óscar Fuentes wrote:
>> With this change the time used by code generation goes down from 33
>> seconds to 26.5.
>
> ... and that's probably not worth it because of the loss of code
> quality.

Agreed. The JIT with default options produces slightly slower code than
a brain-dead alternative backend my compiler has. I expect that once
optimization passes are added to the JIT its code will turn "industrial
grade". That's the justification for adding LLVM support, but if
application startup needs several minutes...

> In Pure I always  use llvm::CodeGenOpt::Aggressive, although
> there's a preprocessor symbol to select llvm::CodeGenOpt::None at
> compile time.
>
> I also found that in Pure the lion's share of compilation time is spent
> in the JIT (and I have a bunch of optimization passes enabled, which
> don't add much to the total compilation time). That's why I always let
> the JIT do its lazy compilation thing, in an interactive
> interpreter-like environment that's quite sensible. If people want to
> get rid of the JIT latency, they have the option to compile their Pure
> scripts to native executables. This approach works very well for me.

Sadly, I cannot produce executables (at least for a large part of the
application's code) and freezing the application for several seconds
here and there while the JIT does its stuff is not an option either, so
I'm forced to JIT all the code on startup.

-- 
Óscar




More information about the llvm-dev mailing list