6 lessons

Instruction Set Architecture

The contract between software and hardware — and the distinction that most performance arguments get wrong: the same ISA is implemented by wildly different microarchitectures.

SourceCompilerInstructionsFront EndExecutionRegistersCachesMemoryI/OBehavior
The ISA: The Contract Between Software and Hardware

An instruction set architecture is the specification a compiler targets and a processor promises to honour: which instructions exist, which registers they name, how memory behaves, and how addresses are formed. Everything about how that promise is kept is deliberately outside it.

Q · What exactly is an instruction set architecture, and where does its authority stop?
ISA vs Microarchitecture: The Distinction Everything Depends On

The instruction set is a specification; the microarchitecture is one machine that implements it. Confusing the two produces most of the bad arguments about processor performance, because it attributes to a published contract things that are properties of a particular chip.

Q · When someone says an architecture is fast or slow, which of the two things they might mean is actually responsible?
x86-64, ARM and RISC-V: Three Families, Three Histories

Three instruction sets dominate current computing, and their differences are largely differences of origin and constraint rather than of achievable performance. Knowing what each optimised for explains their shape better than any claim about which is better.

Q · What actually distinguishes the major instruction sets, and does the choice determine anything a programmer will notice?
RISC vs CISC: A Real Argument That Stopped Predicting Anything

The distinction described a genuine design disagreement about where complexity should live, and it mattered. Then implementations converged: complex instruction sets began decoding into simple internal operations, and reduced ones grew complex instructions. The labels survived the situation that gave them meaning.

Q · What did the RISC/CISC distinction originally mean, and why does it no longer predict how a processor performs?
Reading Assembly Without Writing It

Assembly is the readable form of what the machine will actually execute. Most engineers will never write it, and being able to read it is the single most direct way to check what the compiler did rather than guessing.

Q · What do assembly instructions actually mean, and how do I read them well enough to check what my compiler produced?
Addressing Modes: How an Index Becomes an Address

Instructions do not just name registers — they name ways of computing an address from registers, constants and a scale factor. The reason `arr[i]` costs one instruction rather than three is that the hardware performs exactly the arithmetic that array indexing requires.

Q · How does an instruction specify where in memory to read or write, and why does array indexing come out so cheap?