Intel Forced to Remove “Cripple AMD” Function from Compiler?

Here’s something you probably don’t know, but really should – especially if you’re a programmer, and especially especially if you’re using Intel’s compiler. It’s a fact that’s not widely known, but Intel’s compiler deliberately and knowingly cripples performance for non-Intel (AMD/VIA) processors.

Agner Fog details this particularly nasty examples of Intel’s anticompetitive practices quite well. Intel’s compiler can produce different versions of pieces of code, with each version being optimised for a specific processor and/or instruction set (SSE2, SSE3, etc.). The system detects which CPU it’s running on and chooses the optimal code path accordingly; the CPU dispatcher, as it’s called.

“However, the Intel CPU dispatcher does not only check which instruction set is supported by the CPU, it also checks the vendor ID string,” Fog details, “If the vendor string says ‘GenuineIntel’ then it uses the optimal code path. If the CPU is not from Intel then, in most cases, it will run the slowest possible version of the code, even if the CPU is fully compatible with a better version.”

It turns out that while this is known behaviour, few users of the Intel compiler actually seem to know about it. Intel does not advertise the compiler as being Intel-specific, so the company has no excuse for deliberately crippling performance on non-Intel machines.

“Many software developers think that the compiler is compatible with AMD processors, and in fact it is, but unbeknownst to the programmer it puts in a biased CPU dispatcher that chooses an inferior code path whenever it is running on a non-Intel processor,” Fog writes, “If programmers knew this fact they would probably use another compiler. Who wants to sell a piece of software that doesn’t work well on AMD processors?”

In fact, Fog points out that even benchmarking programs are affected by this, up to a point where benchmark results can differ greatly depending on how a processor identifies itself. Ars found out that by changing the CPUID of a VIA Nano processor to AuthenticAMD you could increase performance in PCMark 2005’s memory subsystem test by 10% – changing it to GenuineIntel yields a 47.4% performance improvement! There’s more on that here [print version – the regular one won’t load for me].

In other words, this is a very serious problem. Luckily, though, it appears that the recent antitrust settlement between AMD and Intel will solve this problem for at least AMD users, as the agreement specifically states that Intel must fix its compiler, meaning they’ll have to fix their CPU dispatcher.

The Federal Trade Commission is investigating Intel too, and it is also seeking a resolution of the compiler issue, but the FTC takes it all a step further than the Intel-AMD settlement. Since the latter only covers AMD, VIA could still be in trouble. Consequently, the FTC asks that Intel do a lot more than what’s described in the AMD settlement:

Requiring that, with respect to those Intel customers that purchased from Intel a software compiler that had or has the design or effect of impairing the actual or apparent performance of microprocessors not manufactured by Intel (“Defective Compiler”), as described in the Complaint:

  1. Intel provide them, at no additional charge, a substitute compiler that is not a Defective Compiler;
  2. Intel compensate them for the cost of recompiling the software they had compiled on the Defective Compiler and of substituting, and distributing to their own customers, the recompiled software for software compiled on a Defective Compiler; and
  3. Intel give public notice and warning, in a manner likely to be communicated to persons that have purchased software compiled on Defective Compilers purchased from Intel, of the possible need to replace that software.

Fog also offers up a number of workarounds, such as using GNU GCC, whose optimisations are similar to that of Intel’s compiler, “but the Gnu function library (glibc) is inferior”. You can also patch Intel’s CPU dispatcher – Fog even provides a patch to do so in “Optimizing software in C++: An optimization guide for Windows, Linux and Mac platforms“.

This is a particularly nasty kind of anticompetitive practice, as it really requires deep knowledge of matters in order to find it out. God knows how many benchmarks have been skewed in favour of Intel simply because people unknowingly used Intel’s compiler in good faith. Intel’s compiler is seen as the cream of the crop and delivers superior performance, but apparently only if you stick to GenuineIntel.

123 Comments

  1. 2010-01-03 8:46 pm
  2. 2010-01-03 9:01 pm
    • 2010-01-03 9:08 pm
      • 2010-01-03 10:45 pm
        • 2010-01-04 1:16 am
        • 2010-01-04 4:50 am
    • 2010-01-03 9:09 pm
    • 2010-01-03 9:28 pm
    • 2010-01-03 11:23 pm
      • 2010-01-03 11:29 pm
        • 2010-01-04 12:18 am
          • 2010-01-04 12:27 am
        • 2010-01-04 9:51 pm
          • 2010-01-05 9:02 am
  3. 2010-01-03 9:06 pm
    • 2010-01-03 9:13 pm
      • 2010-01-03 10:47 pm
        • 2010-01-03 10:59 pm
          • 2010-01-03 11:17 pm
          • 2010-01-04 11:30 am
          • 2010-01-04 11:53 am
          • 2010-01-04 12:17 pm
          • 2010-01-04 12:40 pm
          • 2010-01-04 12:44 pm
          • 2010-01-04 4:08 pm
          • 2010-01-04 4:26 pm
        • 2010-01-04 3:23 am
          • 2010-01-04 10:14 am
        • 2010-01-05 5:32 am
          • 2010-01-05 8:30 am
        • 2010-01-08 1:30 am
          • 2010-01-08 9:10 am
      • 2010-01-04 6:21 am
    • 2010-01-03 9:27 pm
      • 2010-01-03 10:53 pm
        • 2010-01-04 3:09 am
          • 2010-01-04 2:06 pm
          • 2010-01-05 10:07 am
          • 2010-01-05 10:25 am
        • 2010-01-04 1:29 pm
    • 2010-01-03 9:30 pm
      • 2010-01-03 10:56 pm
        • 2010-01-03 11:40 pm
    • 2010-01-03 11:16 pm
    • 2010-01-03 11:33 pm
      • 2010-01-03 11:44 pm
        • 2010-01-04 12:06 am
        • 2010-01-04 3:33 am
          • 2010-01-04 9:22 am
          • 2010-01-05 7:32 pm
          • 2010-01-05 7:42 pm
  4. 2010-01-03 9:25 pm
    • 2010-01-03 9:29 pm
      • 2010-01-03 9:36 pm
  5. 2010-01-03 9:56 pm
    • 2010-01-03 11:49 pm
  6. 2010-01-03 9:57 pm
    • 2010-01-03 10:38 pm
      • 2010-01-03 10:56 pm
        • 2010-01-03 11:16 pm
          • 2010-01-03 11:27 pm
          • 2010-01-03 11:33 pm
          • 2010-01-05 6:50 am
          • 2010-01-05 8:43 am
          • 2010-01-03 11:48 pm
          • 2010-01-03 11:54 pm
          • 2010-01-03 11:55 pm
          • 2010-01-04 12:01 am
          • 2010-01-04 12:08 am
          • 2010-01-04 12:15 am
          • 2010-01-04 3:40 am
          • 2010-01-04 9:25 am
          • 2010-01-04 2:26 am
          • 2010-01-04 9:19 am
          • 2010-01-04 10:00 pm
          • 2010-01-05 8:41 am
          • 2010-01-05 11:46 am
          • 2010-01-04 1:54 am
          • 2010-01-04 3:58 pm
          • 2010-01-04 4:22 pm
          • 2010-01-04 4:43 pm
          • 2010-01-04 3:47 am
          • 2010-01-04 12:33 pm
          • 2010-01-04 12:40 pm
          • 2010-01-04 11:43 pm
          • 2010-01-07 3:11 pm
      • 2010-01-03 11:02 pm
      • 2010-01-04 1:49 am
      • 2010-01-04 4:55 am
        • 2010-01-04 5:48 am
        • 2010-01-04 9:32 am
          • 2010-01-04 9:42 am
          • 2010-01-04 10:08 am
      • 2010-01-04 4:29 pm
  7. 2010-01-03 10:05 pm
  8. 2010-01-03 10:54 pm
    • 2010-01-03 11:03 pm
      • 2010-01-05 1:27 am
    • 2010-01-03 11:10 pm
  9. 2010-01-03 11:22 pm
  10. 2010-01-03 11:58 pm
    • 2010-01-04 12:00 am
    • 2010-01-04 3:25 am
    • 2010-01-04 9:23 am
      • 2010-01-04 9:39 am
        • 2010-01-04 10:07 am
          • 2010-01-04 10:35 am
          • 2010-01-04 2:51 pm
          • 2010-01-04 3:01 pm
        • 2010-01-04 3:34 pm
          • 2010-01-04 3:50 pm
  11. 2010-01-04 12:00 am
    • 2010-01-05 9:27 am
  12. 2010-01-04 12:37 am
  13. 2010-01-04 2:37 am
    • 2010-01-04 9:00 am
  14. 2010-01-04 2:11 pm
    • 2010-01-04 4:25 pm
      • 2010-01-04 4:28 pm
        • 2010-01-04 4:47 pm
      • 2010-01-04 4:59 pm
  15. 2010-01-05 1:16 pm
  16. 2010-01-05 9:06 pm