Albert Graef <Dr.Graef at t-online.de> writes:> Óscar Fuentes wrote: >> Okay, I'll do if some day I figure out how to pass those options to the >> JIT :-) > > Well, the -fast option is easy to get: > > MP = new ExistingModuleProvider(module); > string error; > JIT = ExecutionEngine::create(MP, false, &error, llvm::CodeGenOpt::None);Thanks Albert. With this change the time used by code generation goes down from 33 seconds to 26.5. -- Óscar
Ó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. 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. Just my 0.02c. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr.Graef at t-online.de, ag at muwiinfa.geschichte.uni-mainz.de WWW: http://www.musikinformatik.uni-mainz.de/ag
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