All articles
165 articles · updated weekly See our Tools
All articles
Comparisons

ARM vs x86: The Practical Difference and the exec format error

ARM and x86 speak different instructions: the real difference (RISC vs CISC, power, legacy) and how to avoid exec format error with multi-arch Docker builds.

ARM vs x86: The Practical Difference and the exec format error
COVER · Comparisons

You ran docker pull on your favorite image on the new MacBook, ran docker run, and got hit with exec format error. Or worse: the build passed cleanly on your machine, went through CI, and broke on an AWS Graviton instance with the same message. Neither is a bug in your code. It's the reminder, the hard way, that there are two dominant CPU families and they don't speak the same machine language.

The short answer, before the explanation:

ARM (AArch64) x86-64
Instruction set RISC: fewer, simpler instructions CISC: many instructions, some complex
Instruction length fixed, 32 bits on ARM64 variable, 1 to 15 bytes
Decoding simpler and cheaper more expensive, because of variable length
Strength performance per watt software and driver legacy
Where it dominates phones, Apple Silicon, cloud (Graviton) Windows PCs, traditional servers
Examples Apple M, AWS Graviton, Snapdragon X Intel Core and Xeon, AMD Ryzen and EPYC
uname -m aarch64 (Linux), arm64 (macOS) x86_64

This post explains what really separates the two, why the RISC vs CISC split no longer means what you learned in college, and what it changes for anyone who builds and deploys software, with a multi-arch Dockerfile I built for both platforms.

The real difference is the instruction set

What separates ARM from x86 isn't speed, power draw or brand. It's the ISA (instruction set architecture): the contract between software and silicon, the set of binary instructions a processor knows how to execute. A binary compiled for x86-64 is a sequence of opcodes only the x86 family understands. ARM has a different vocabulary, and neither CPU runs the other's without translation.

x86 was born with the Intel 8086 in 1978. ARM came out of Acorn in the 1980s with the opposite philosophy. x86 is CISC: many instructions, some doing a lot in a single opcode, with variable length. ARM is RISC: simple, regular instructions, and the compiler builds complex operations out of them. On 64-bit ARM (AArch64), every instruction is 32 bits. 32-bit ARM had Thumb mode, with 16- and 32-bit instructions, so "fixed length" applies to ARM64, not to the whole family.

Why the RISC vs CISC line blurred

Inside, a modern x86 doesn't execute CISC instructions directly. A decoder up front breaks them into micro-ops, small regular operations the core actually executes. And high-performance ARM does something similar: Arm itself describes, for the Neoverse N1, instructions decoded into macro-operations that can later be cracked into micro-operations. Both sides ended up with similar internal engines.

What remains is the cost of decoding. With aligned 32-bit instructions, ARM64 knows where each instruction starts and decodes several in parallel with simple hardware. On x86, an instruction can be 1 to 15 bytes long, and figuring out where one ends and the next begins is already work; cores compensate with micro-op caches and wide decoders, which cost transistors and power. Add decades of legacy x86 has to keep: operating modes inherited from the 8086, instructions almost nobody uses anymore.

Power efficiency vs legacy

That's why ARM won phones: when every milliwatt comes out of a battery, a simpler front end is a direct advantage. Apple Silicon showed the architecture scales to laptops and desktops. In the cloud, AWS states that Graviton instances cost up to 20% less than comparable x86 instances and use up to 60% less energy for the same performance (AWS's own numbers, checked in November 2026). On Windows, Snapdragon X laptops run x86 and x64 apps through the Prism emulator, which Microsoft shipped in Windows 11 24H2; drivers, however, must be native ARM64.

x86 didn't lose because of this. Where the math is raw performance with power as a secondary concern (workstations, heavy databases, games), Intel and AMD remain competitive. And there's the legacy: decades of software compiled only for x86, drivers and enterprise apps nobody will recompile. If you want to understand why "more cores" doesn't always help, the post on CPU cores and threads is the foundation for this comparison. And if the question is which machine to buy, that choice is in how to choose a laptop for programming.

The practical pain: binaries have an architecture

This is where theory becomes an incident. exec format error is the kernel saying that file isn't an executable for your CPU family. To find out where you are:

uname -m
# x86_64   -> 64-bit x86
# aarch64  -> 64-bit ARM (Linux); macOS shows arm64

Docker images carry compiled binaries, so a linux/amd64 image on an ARM host only runs under emulation. On the Mac, Docker Desktop emulates with QEMU by default, according to the multi-platform build docs, which warn that emulation "can be much slower" than native. With the Apple Virtualization framework as the VMM, there's a "Use Rosetta for x86_64/amd64 emulation on Apple Silicon" option under Settings > General that speeds up amd64 images with Rosetta. The 4.25 release announcement said it was on by default on macOS 14.1 or newer; the current settings table lists "Disabled" as the default, so check your own install. Docker VMM, in beta, doesn't support Rosetta yet. Whichever path you're on, emulation is a crutch: it works, but it's slower and occasionally breaks on architecture-sensitive code.

To choose the platform on purpose and check what you have:

docker run --platform linux/amd64 my-image      # force the amd64 variant
docker image inspect my-image --format '{{.Architecture}}'

In Compose, the equivalent key is platform: linux/amd64 on the service. If image, container and registry still blur together, the post on Docker image vs container separates them.

Multi-arch: buildx solves it, as long as the Dockerfile helps

The fix is to publish the image for both architectures and let the registry hand each host the right one, through a manifest list:

docker buildx build \
  --platform linux/amd64,linux/arm64 \
  -t your-user/your-image:tag \
  --push .

That alone does not guarantee the end of exec format error. I tested a Dockerfile that downloads the jq binary straight from the release, with the architecture hardcoded:

FROM debian:12-slim
ADD https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64 /usr/local/bin/jq
RUN chmod +x /usr/local/bin/jq
ENTRYPOINT ["jq"]

buildx built both platforms without complaint. I opened the arm64 variant and read the ELF architecture field (two bytes at offset 18): 3e 00, which is x86-64. The image says arm64, the binary is amd64. On my x86 machine the arm64 variant even "worked", because the amd64 binary runs natively; on a Graviton or a Mac without emulation, it's exec format error. The bug hides exactly where you test.

The fix is TARGETARCH, a build arg BuildKit fills with each target platform's architecture (amd64, arm64):

FROM debian:12-slim
ARG TARGETARCH
ADD https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-${TARGETARCH} /usr/local/bin/jq
RUN chmod +x /usr/local/bin/jq
ENTRYPOINT ["jq"]

With this version, the amd64 variant carries ELF 3e and the arm64 one carries b7, the AArch64 code; both answer jq-1.7.1. The same care applies to the base image (it needs an arm64 variant) and to native dependencies: npm packages with prebuilt binaries and Python wheels have an architecture too. To compile without emulation, the docs' pattern is FROM --platform=$BUILDPLATFORM in the build stage and cross-compiling for $TARGETARCH, combined with multi-stage builds, which the post on a smaller, safer Dockerfile covers.

My take: build multi-arch by default, even if today you only deploy on x86. Adding --platform and a TARGETARCH costs minutes; discovering this during a Graviton migration under pressure costs a weekend.

Frequently asked questions

Is ARM faster than x86?

It depends on the workload. In performance per watt, ARM usually wins, which is why it dominates phones and keeps growing in the cloud. In raw performance with no concern for power, top-end Intel and AMD x86 chips remain competitive. There's no universal "faster", only faster for that workload, under that power and cost budget.

What is exec format error in Docker?

It's the kernel refusing an executable from another architecture: an amd64 image or binary on an arm64 host, or the reverse, with no emulation available. Check with uname -m on the host and docker image inspect --format '{{.Architecture}}' on the image. If the image is multi-arch and the error persists, look for binaries downloaded in the Dockerfile with a hardcoded architecture.

Can I run x86 software on an ARM chip?

Yes, through emulation or binary translation: Rosetta 2 on macOS, QEMU (or Rosetta) in Docker Desktop, Prism on Windows 11 on Arm. It works in most cases, at a cost in performance and, sometimes, bugs in low-level code. In production, prefer native binaries.

Do I need to care if I only write high-level code?

In the code itself, almost never: the compiler or runtime handles the ISA. The pain shows up in packaging: Docker images, prebuilt binaries, native dependencies. That's where exec format error finds you, and where --platform and TARGETARCH fix it.

Assume a world with two architectures

ARM and x86 are incompatible ISAs. Inside, both break instructions into micro-ops; the difference that remains is the cost of decoding and the weight of legacy, which turn into efficiency for ARM and compatibility for x86. For anyone who deploys, the consequence doesn't change: binaries have an architecture, emulation is a crutch, and buildx --platform only works if the Dockerfile doesn't hardcode amd64 anywhere. When you need to read an ELF header or a register in hex, the binary converter turns 0x3e and 0xb7 into decimal and binary without mental math.

RD
Author
Rafael Duarte
Backend developer with a background in fintech and B2B SaaS — worked on teams that scaled APIs from zero to millions of requests. Carries enough production scars to hold strong opinions on tools, patterns and architecture decisions. Not an academic: he read the UUID RFC when he had to choose between v4 and v7 for a write-heavy table.
View profile