← Back to context

Comment by orlp

1 day ago

Intel's C++ compiler is known to add branches in its generated code checking if the CPU is "GenuineIntel" and if not use a worse routine: https://en.wikipedia.org/wiki/Intel_C%2B%2B_Compiler#Support....

Even in the middle of that turmoil, we managed to compile some code with Intel's ICC and make it go faster on AMD Opterons, breaking Intel's own numbers.

When my colleague said that they managed to go faster than intel with icc with some hand tuned parameters, I remember answering "youdidwat?".

Good times.

Is this for the runtime of the compiled code or for the compiling machine? Do they generate slow code if the compiler is running on non-intel?

  • Runtime of the compiled code. The ostensible intent is so that new processors can use new features like SIMD, while offering a fallback for older ones. In practice, they’re detecting an Intel processor, not just the specific feature.