MHZ(8)
πΈ NAME πΈ
mhz β ok so bestie, this is the girl that calulates (yes, the original page says "calulate", and honestly? we respect the typo era π ) your processor clock rate. That's it. That's the whole job. She's a microbenchmark and she's booked, busy, and about to tell you exactly how fast your CPU is vibing.
π SYNOPSIS π
mhz [-c]
β¨ DESCRIPTION β¨
So here's the tea: mhz calculates the processor clock rate and megahertz. Periodt.
How does she do it? She runs an unrolled, interlocked loop of adds or shifts β like, a whole choreographed routine of adds and shifts, no gaps, no waiting around. Iconic behaviour fr fr.
And the wild part? So far, superscalarness has been defeated on the tested processors, which are:
- SuperSPARC
- RIOS
- Alpha
The processors tried to be sneaky and do multiple things at once to mess up the measurement, and the loop said "not today" π«Ά. Main character energy.
π OUTPUT π
The output format is either just the clock rate as a float (that's the -c vibe) or more verbose. Your choice, babe.
The verbose one looks exactly like this:
39.80 Mhz, 25 nanosec clock
And if you want the full deep-dive lore, mhz is described more completely in:
``mhz: Anatomy of a microbenchmark''
which appeared in Proceedings of 1998 USENIX Annual Technical Conference, June 1998. Academic queen π.
π¦ SEE ALSO π¦
π AUTHOR π
Carl Staelin and Larry McVoy π«
Comments, suggestions, and bug reports are always welcome. Like, genuinely β slide into their inbox, they wanna hear from you.
And that's the whole page, bestie. Copyright shoutout to round it off: (c)1994-2000 Carl Staelin and Lar... and yeah the date placeholder is literally $Date$ β she's mysterious like that π. Stay fast, stay interlocked, mwah π
β¨
π¦ where this page comes from
- debian bookworm: lmbench 3.0-a9+debian.1-6
- debian trixie: lmbench 3.0-a9+debian.1-9
- ubuntu jammy: lmbench 3.0-a9+debian.1-6
- ubuntu noble: lmbench 3.0-a9+debian.1-6build3
- ubuntu questing: lmbench 3.0-a9+debian.1-9
- ubuntu resolute: lmbench 3.0-a9+debian.1-10
- ubuntu stonking: lmbench 3.0-a9+debian.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms