Ross ROSS = Recommend OSS · open-source software intelligence for agents

martinus/nanobench

Simple, fast, accurate single-header microbenchmarking functionality for C++11/14/17/20 observed · 2026-08-28

github.com/martinus/nanobench · homepage · C++ · MIT (permissive) observed · 2026-08-28

Health v2 · maintenance only

99/100

  • Activity 99
  • Release rhythm 98
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: 0.0
  • age_days: 2524
  • days_rel: 19
  • days_push: 10
  • n_releases_24m: 3

Full methodology

Adoption not part of the score

1730 stars · 104 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

ankerl::nanobench is a single-header, platform-independent microbenchmarking library for C++11/14/17/20. It measures ns/op, op/s, instructions, cycles, IPC, and branch misses with fast, accurate, repeatable results.

Use cases

  • benchmark small C++ code snippets
  • measure nanoseconds per operation in C++
  • compare performance of C++ implementations
  • profile instruction counts and branch misses of hot code
  • add microbenchmarks to a C++ project with minimal setup
  • replace google benchmark with a faster, header-only alternative

When to choose

  • you need quick, accurate microbenchmarks in C++ with zero build complexity
  • you want a single-header library that integrates via CMake FetchContent or direct inclusion
  • you need detailed metrics like IPC and branch prediction misses

When to avoid

  • you need full application profiling rather than microbenchmarking
  • you are not working in C++
  • you need distributed or long-running benchmarking infrastructure

Facets

library · maturity stable

benchmarking developer-tools performance cross-platform cpp header-only single-header microbenchmark cpp11 performance-measurement

3 sources

Member repositories

RepositoryRoleHealth v2
martinus/nanobenchmain99

For agents

markdown · JSON · MCP: product_card(name="martinus/nanobench")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem