I am doing research on Profile-Guided Optimization (PGO) adoption across the industry. According to the build scripts, Erlang OTP already supports building with PGO. However, I didn’t find any performance benchmarks before and after enabling PGO in Erlang OTP. Does anyone have such performance numbers? Would be helpful to see them, so in this case for us would be easier to consider building our Erlang OTP version with or without PGO.
Thanks in advance!
How much PGO gives varies a lot depending on the platform and C compiler used. We used the Erlang/OTP benchmarks to determine the effect and found that it never made things slower, but it sometimes made things faster.
With the introduction of the JIT a couple of years ago the difference it makes has becomes even smaller.
How much PGO gives varies a lot depending on the platform and C compiler used.
I understand that it depends on the platform and C compiler used to perform the compilation and PGO optimization phase. I am interested in any platform/compiler combination.
We used the Erlang/OTP benchmarks to determine the effect and found that it never made things slower, but it sometimes made things faster.
Could you please share your numbers? As I understand, you have some performance measurement numbers already. Even if they are quite old and a done before JIT introduction - would be nice to see them.
It was a long time ago and I don’t have the numbers available any longer. You can get numbers yourself by compiling Erlang with or without PGO and running the benchmarks I linked.
From what I recall, PGO was only good on systems where gcc/clang did a poor job at statically optimizing our code (especially the interpreter loop, which is a huge function using computed gotos). Where it did the most difference was old clang versions and gcc on powerpc.
I guess would be better to leave the topic open - maybe someone can post their PGO benchmarks. Or when I will be able to perform tests on my configuration - I’ll post the results here.