Compiler Optimizations Intel vs AMD
Discussions focus on how compilers, especially Intel's ICC, generate code optimized for Intel CPUs that performs worse on AMD processors, including historical sabotage claims, CPU-specific features like AVX/SSE, and techniques like runtime dispatch or -march=native.
Activity Over Time
Top Contributors
Keywords
Sample Comments
The compilers are probably better optimized for the Intel chips.
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?
Compilers like GCC can produce code specifically for your CPU such that it uses all of the special features you might have like SSE, AVX etc. When binaries are made for general use they have to be compiled with a generic feature set so might not make best use of your CPU.
Wouldn't it be possible to have a binary containing multiple versions of your program compiled optimized for various CPU configuration and have a switch at runtime which would select depending on your CPUid. I think intel have a compiler for that.
Hey, my name is ICC, and I'm one of the most respected compilers in the industry. I also sabotage your code so that it works poorly on AMD CPUs, while making sure that Intel CPUs run my code at full speed. After all, Intel likes to establish market dominance.http://www.agner.org/optimize/blog/read.php?i=49#49Blind trust in the compiler is bad people. Good luck discussing this issue without any Assembly Program
Considering most CPU cores (Arm/X86/etc) are optimized for C/GCC its an unsurprising result
My guess: Intel is using one of their super optimizing compilers to get these speeds. I'd wager that if you run this on an AMD CPU, it slows down.
Every performant compiler on the SPECcpu benchmarks does this.
This will never work due to incentive structure, unless the compiler devs are working for the same company that makes the CPU. Otherwise, compiler devs will target a lowest common denominator and call it a day. And even if the compiler devs perfectly support new CPU instructions, compiler users usually want a single binary that can run on as many CPUs as possible, and so will use the lowest common denominator once again. Currently, your CPU will 99% of the time run basic AMD64 instructions, rega
This seems like something that compilers should do and CPU instruction sets should not.