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.

➡️ Stable 0.6x Hardware
3,847
Comments
20
Years Active
5
Top Authors
#95
Topic ID

Activity Over Time

2007
1
2008
3
2009
25
2010
84
2011
58
2012
73
2013
124
2014
210
2015
151
2016
225
2017
196
2018
239
2019
345
2020
425
2021
366
2022
297
2023
343
2024
332
2025
337
2026
13

Keywords

e.g CPU TP PGI AMD read.php MOV AND AMD64 ABI compiler cpu intel compilers code gcc compiled amd asm instructions

Sample Comments

Synaesthesia Jun 19, 2017 View on HN

The compilers are probably better optimized for the Intel chips.

pieterbreed Jul 11, 2025 View on HN

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?

black-tea Feb 3, 2019 View on HN

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.

skywal_l Feb 3, 2022 View on HN

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.

dragontamer Feb 19, 2013 View on HN

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

boznz Sep 15, 2017 View on HN

Considering most CPU cores (Arm/X86/etc) are optimized for C/GCC its an unsurprising result

theandrewbailey May 13, 2019 View on HN

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.

wumpus Dec 8, 2019 View on HN

Every performant compiler on the SPECcpu benchmarks does this.

tormeh Mar 23, 2023 View on HN

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

Tloewald Aug 11, 2016 View on HN

This seems like something that compilers should do and CPU instruction sets should not.