BenchKit: Why over-benchmarking hurts more than it helps.

Published December 12, 2025

BenchKit: Why over-benchmarking hurts more than it helps.

Abstract

As you may know, I introduced BenchKit a while ago, and it hasn't been used much since. We'll be talking about how doing Premature Benchmarks could slow down your development time.

I: The Myth of benchmarking everything.

First things first, you'd have to get a good reason to benchmark in the first place. There is things that don't need to be benchmarked, others do however.

I do believe that there's no rule in finding use cases and they're context specific.

II: When to benchmark.

When you are done with the code, literally. There's no need to benchmark unfinished code.

II: When not to benchmark.

When your code doesn't do what it does. Why benchmark code that doesn't do its purpose yet?

References

  • https://github.com/nekernel-org/nekernel/blob/develop/src/misc/BenchKit/Chronometer.h
  • https://github.com/nekernel-org/nekernel/blob/develop/src/misc/BenchKit/HWChronometer.h