Truffle on-stack-replacement sometimes not working well with background compilation?
gerard at gerardkrol.nl
Thu Aug 4 19:46:17 UTC 2016
I've had some performance problems with Cover and a specific benchmark.
Yesterday I finally figured out what was going on. The problem seems to be
that on-stack-replacement doesn't always work well with background
The benchmark (fannkuch, ) did take 311 seconds to run, while the GCC
version would finish in 25 seconds. Warming up (running the benchmark twice
and timing the second run) would reduce the runtime to 47 seconds. I like
to run my benchmarks without warmup though, as that is a good worst-case
I then figured out that just adding
-Dgraal.TruffleBackgroundCompilation=false made a huge difference. The time
needed was reduced to 52 seconds.
Is this a bug? Expected behavior in some cases? Am I doing something wrong?
1. Get Cover from  (don't forget the 5th installation step)
2. Run time ./cover tests/fannkuch-redux_gcc5.cover
3. Run time ./cover -benchmark tests/fannkuch-redux_gcc5.cover (this will
disable the background compilation)
More information about the graal-dev