Resources¶
Level: reference
The talk the first chapter follows¶
Matt Godbolt — Benchmarking: It's About Time. Closing keynote, C++Now 2026; published 2026-07-14, 97 minutes. Video ↗ · slides ↗ · slide source ↗. The source is BSD 2-Clause, © 2026 Hudson River Trading LLC, and holds more than the deck: the speaker notes (notes.md), research notes, and the benchmark harness the talk's numbers came from.
The standard¶
Cited by stable name from the working draft at eel.is:
- Clock requirements ↗ — the six members every clock has
- system_clock ↗, steady_clock ↗, high_resolution_clock ↗
- Non-member time_point arithmetic ↗ — the single
Clockparameter behind the Type safety slide - clock_cast ↗
- Timing specifications ↗ — why
sleep_forwaits at least as long as asked - The as-if rule ↗ — and what counts as observable behaviour
- numeric_limits, the primary template ↗
- Class member lookup ↗ — paragraph 6 is the rule behind GCC's "changes meaning"
References¶
- cppreference: the chrono library ↗ — its
high_resolution_clockpage records the argument about deprecating that name - Google Benchmark user guide ↗, and utils.h ↗, where
DoNotOptimizeandClobberMemoryare defined - Python's time module ↗ — for the bridges on each page
Proposals¶
- P0342R0 — Timing barriers ↗, Mike Spertus, 2016
- P0412R0 — Benchmarking Primitives ↗, Mikhail Maltsev, 2016
- P1152R0 — Deprecating volatile ↗, JF Bastien, 2018
The implementations, at the source¶
- libstdc++ — bits/chrono.h ↗, with the
high_resolution_clockalias and the_V2namespace, and src/c++11/chrono.cc ↗, with whatsteady_clock::now()calls and its fallback - libc++ — src/chrono.cpp ↗:
CLOCK_MONOTONIC_RAWon Apple platforms, since a change in 2020 ↗ - MSVC STL — __msvc_chrono.hpp ↗
Books¶
- Nicolai M. Josuttis, The C++ Standard Library: A Tutorial and Reference, 2nd ed. (Addison-Wesley, 2012), §5.7 "Clocks and Timers", from p. 143 — the C++11 design of durations, clocks and time points, including the history that
steady_clockwas first proposed asmonotonic_clock.