Performance, Power & Energy

the MIPS metric

/ MIPS: mips /

MIPS stands for millions of instructions per second. It sounds like a perfect speed score: just count how many instructions a computer runs each second and bigger is better, right? It is tempting because it is a single, simple number you can print on a box. But it is one of the great traps in measuring computers, and learning why it misleads teaches you what real performance is. (Note: MIPS the metric is not the same thing as MIPS the instruction set, an unfortunate name collision.)

MIPS is computed as instruction count divided by execution time, divided by one million; equivalently it is the clock rate divided by CPI, over one million. The fatal flaw is hiding in plain sight: it counts instructions, but instructions are not equal units of work. A machine with a simple instruction set may need three instructions to do what another machine does in one. So the first machine can rack up a higher MIPS number while actually getting less work done. MIPS rewards running many cheap instructions fast, even if they accomplish little — exactly backwards from what you want.

Worse, MIPS varies from program to program on the same machine (different instruction mixes give different CPIs), so there is no single MIPS for a computer. And you cannot compare MIPS across different instruction sets at all, because their instructions mean different amounts of work. The lesson is the iron law: the only honest measure is the time to run a real program, which is instruction count times CPI times clock-cycle time. MIPS, raw FLOPS, and clock gigahertz are all proxies that can be gamed; engineers half-jokingly expand MIPS as 'meaningless indicator of processor speed.'

Machine A (simple ISA) runs a task in 6e9 instructions; machine B (richer ISA) in 2e9 instructions, both in 1 second. A scores 6000 MIPS, B scores 2000 MIPS — yet they finished the identical task in identical time. By MIPS, A looks 3x 'faster'; by the only honest measure (run time), they tie.

More instructions per second is not more work per second. MIPS can rank the slower machine higher.

Never compare MIPS (or raw FLOPS, or gigahertz) across different machines as a measure of real speed. Only the wall-clock time on the actual program you care about is honest. The metric MIPS is unrelated to the MIPS instruction set despite the shared name.

Also called
millions of instructions per secondMIPSmeaningless indicator of processor speed每秒百萬指令數