Skip to main content

Dhrystone

Dhrystone is a classic synthetic integer benchmark whose DMIPS unit still appears on datasheets. It is small, cache-resident, and easily skewed by compilers, so it is best treated as a historical or smoke-test metric.

Dhrystone is a synthetic integer benchmark published in 1984 by Reinhold Weicker. It was designed to represent typical systems-programming code: string handling, pointer manipulation, function calls, and integer arithmetic, with no floating point. For decades it was the dominant CPU comparison, and its derived unit DMIPS still appears on processor datasheets, particularly for embedded and microcontroller cores where its tiny footprint remains convenient.

What It Measures

Dhrystone runs a fixed mix of integer and string operations in a tight loop and reports Dhrystones per second. Dividing by 1757, the score of the reference VAX 11/780 that was rated at one MIPS, yields DMIPS (Dhrystone MIPS). Normalizing by clock gives DMIPS/MHz, used to compare core efficiency independent of frequency. The intent is a single integer-performance figure for general-purpose code, summarizing how quickly a processor handles ordinary control flow and data movement.

Methodology

The program executes many iterations of the Dhrystone loop and measures elapsed time. To be meaningful, the run must use enough iterations to dwarf timer resolution; too few iterations produce noise rather than signal. Crucially, compilers must not optimize away the work, which they readily can because much of the computation has no observable output. Valid comparisons require disclosure of compiler, version, and optimization flags, and ideally the use of recognized run rules that prevent dead-code elimination and the inlining of library string functions, both of which can distort results dramatically.

How to Interpret Results

Read DMIPS as a rough integer-throughput estimate and DMIPS/MHz as a per-cycle efficiency estimate. Higher is better. Treat absolute Dhrystone numbers with caution and never compare across different compilers or flag sets without noting them, because optimization choices swing results dramatically. The benchmark is most useful today for historical comparison, quick smoke tests, and very small embedded cores where its tiny footprint is an asset. When a datasheet lists DMIPS, confirm the toolchain assumptions before drawing conclusions.

Limitations

Dhrystone is widely considered obsolete for serious evaluation. It is small enough to fit in cache, so it ignores memory bandwidth and latency. Its string routines are easily special-cased by modern libraries, and clever compilers can inflate scores. It has no floating point, vectorization, or realistic working set, so it tells you nothing about modern numerical, media, or data-intensive code. For modern decisions, prefer CoreMark for embedded cores and SPEC CPU for servers; cite Dhrystone only where datasheets force the comparison, and even then read the fine print.