Performance, Power & Energy

a benchmark

How do you fairly compare two cars? You do not trust the brochure's top-speed number; you take both cars around the same test track, with the same fuel, the same driver, and you time them. A benchmark is that test track for computers: a standard, agreed-upon program (or set of programs) that you run on each machine under controlled conditions so the run times mean something when you compare them.

A benchmark is a workload chosen to represent real use, run identically on competing systems, with execution time (or some derived score) recorded. The best benchmarks are real, complete programs — a compiler compiling code, a fluid simulation, a chess engine — because they exercise the whole machine the way actual software does. Weaker benchmarks are small synthetic kernels or microbenchmarks that isolate one feature; these are useful for diagnosis but easy to misread as overall speed. Because no single program represents all uses, serious benchmarking uses a suite of several programs and summarizes them carefully.

The honest heart of benchmarking is that it gets gamed, constantly, and you must read results skeptically. Vendors tune compilers to detect benchmark code and apply tricks that help nothing else; they pick the suite that flatters their chip; they report the summary (often a geometric mean) that looks best. A benchmark also goes stale as software and workloads evolve. The defenses are: use widely accepted, audited suites like SPEC; insist the benchmark resembles your actual workload; and remember the cardinal rule — the only benchmark that truly matters is your own program on your own data.

A vendor advertises that its chip wins a popular benchmark by 20 percent. On investigation, the win comes from a single benchmark in the suite that the compiler special-cased; on the other programs the chips tie, and on your particular database workload — which the suite does not resemble — the 'winner' is actually slower.

A benchmark is only as honest as its resemblance to your real workload — and only if no one has gamed it.

The only benchmark that ultimately matters is your own program on your own data. Published benchmarks are guides, not guarantees, and they are routinely gamed by compiler tuning, suite selection, and flattering summary statistics.

Also called
benchmark suiteperformance test基準測試效能評測