As I noted in my post, gcc seems to be about 2x better than LLVM for this benchmark. So, it is good to separate two issues:
- Julia has gotten slightly slower (by about 20%, it looks like), for tight recursive calls like the
fibbenchmark, due to the (useful!) introduction of GC safepoints in function calls. This is fine — you would never write this kind of recursive function (which does almost no work per function call) in a performance-critical scenario. Recursion is a powerful and elegant tool, but you often need to (e.g.) enlarge the base case (“coarsen” the recursion) in cases where performance matters: Recursion in Julia — bad idea? - #5 by stevengj gcchas gotten better than LLVM for this benchmark, by around a factor of 2 — this is true even for C, as can be seen if you compile the C code with Clang. There’s probably nothing we can do about this on the Julia side. (Except, again: this is not how you would write a recursive function in a performance-critical context.)