Profiling

Garbage Collection

The Aldor Garbage Collector seems to perform reasonably well in some tests, but until now I was unable to get profiling data that backs this up. Using several tools, I collected data about Aldor running with different allocators. Each of the following tests was executing

  aldor -ginterp sieve.as

With the sieve example from the Aldor User Guide.

oprofile

oprofile is a kernel-space profiler that yields high resolution with almost zero overhead.

callgrind

callgrind is part of valgrind, a runtime instrumentation framework. It does cache profiling and generates callgraphs. Cache profiling is done by simulating the I1, D1 and L2 caches. In contrast to oprofile, callgrind causes a huge performance impact. Programs run about 50 times slower than normal.

Real time measurement

I also measured real time with the zsh built-in time command.

Conclusion

The question is, why does the Aldor GC perform so much worse when compiled with inlining? A possible reason could be that due to inlining and heavy optimisation, the instruction cache is badly utilised. This would be a gcc bug, a misoptimisation. Next, I will do the allocation tests with the two memory managers, again. This time, I will use a non-inlined Aldor GC.