<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/benchmark/catch_benchmark.cpp, branch 0.2.0</title>
<subtitle>Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.</subtitle>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/'/>
<entry>
<title>Don't instantiate the default implementation of benchmarks in every TU</title>
<updated>2026-08-22T21:01:51+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-08-22T17:00:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=69da66ee7370d7c249ba6f2a322a78dcdd623761'/>
<id>69da66ee7370d7c249ba6f2a322a78dcdd623761</id>
<content type='text'>
The underlying benchmarking machinery is templated, so that it can use
different clock implementations (either for testing, or to support user
with platform-specific clocks). However, 99.99% of all users interact
with it using the `BENCHMARK` macro, which means that they use it with
`std::chrono::steady_clock`.

By adding outlined implementation of benchmarking helpers specialized
onto `std::chrono::steady_clock`, we save some amount of time per every
TU that uses benchmarks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The underlying benchmarking machinery is templated, so that it can use
different clock implementations (either for testing, or to support user
with platform-specific clocks). However, 99.99% of all users interact
with it using the `BENCHMARK` macro, which means that they use it with
`std::chrono::steady_clock`.

By adding outlined implementation of benchmarking helpers specialized
onto `std::chrono::steady_clock`, we save some amount of time per every
TU that uses benchmarks.
</pre>
</div>
</content>
</entry>
</feed>
