If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

AMD Llano Compiler Performance

08-19-2011, 01:10 AM

Phoronix: AMD Llano Compiler Performance

Last week were a set of AMD Fusion A8-3850 Linux benchmarks on Phoronix, but for you this week is a look at the AMD Fusion "Llano" APU performance when trying out a few different compilers. In particular, the latest GCC release and then using the highly promising Clang compiler on LLVM, the Low-Level Virtual Machine.

Nice benchmarks. Michael there are many programmers in your forum, so benchmarks like this are very useful. Not just the compilers, but we can answer question:"What CPU i should buy, that will bring me max compiler performance for the buck."
Thanks.

Comment

I'd like to note that the Phoronix habit of using some compiler flags, without caring much which flags, can be seen e.g. on the PovRay numbers.
povray-3.6.1, being a 2004ish package, has this jam in configure:
k8-*|x86_64-*) pov_arch="k8"; pov_arch_fallback="i686";;
This means, if the compiler accepts -march=k8 -mtune=k8 (-O3 -msse2 and a couple of other options), that will be used to compile it, instead of tuning for the CPU you are compiling on, or at least tuning for contemporary CPUs.
Looking at speed of program optimized for a completely different CPU than you are using is uninteresting, either you tune for contemporary CPUs (as most distributions do and several compilers even default to), or optimize for your own CPU.
Looking at povray 3.7.0 rc3, this has changed there quite a bit (though it is still at least two years behind on CPUs and features it wants to use).
E.g. gcc is by default configured to tune for -mtune=generic, which is tuning for recentish Intel and AMD CPUs, but also supports -march=native/-mtune=native and/or -Ofast options which tune for the CPU running the compiler.
I don't have a Llano CPU, so I couldn't repeat the measurements there, but have run (just single time each, just to show that the compiler flags really matter) it on an Intel i7-2600 CPU:

As can be seen, yes, gcc k8 tuned code on Intel SandyBridge is significantly slower than clang k8 tuned code, but all other tunings, even just tuning for a generic CPU, is faster, some significantly. From what I've seen, similar hardcoded options (some time ago I saw even -O option being used in one of the phoronix benchmarks, haven't rechecked if it has been fixed since then or not, I think it was the byte benchmark) exist in many other phoronix benchmarks. E.g. -O1 is (at least for GCC) defined to do only some cheap optimizations, with stress on fast compilation and not making code much hard to debug.

Until this is changed, I think the compiler benchmarks aren't really useful at all.