Skip to content

Major microbenchmark revamp

In microbenchmarks of short-running code like surface intersection, the overhead of the benchmark harness (e.g. random number generation) can easily exceed that of the code under study, and it's hard to reach confidence that the compiler hasn't optimized anything out.

In an attempt to defeat these problems, this MR proposes super-low-overhead primitives for defeating compiler optimizations in microbenchmarks.

Some tests are provided, which also serve as an example-based introduction to what the newly introduced primitives can and can't do.

Finally, existing microbenchmarks are also ported to the new primitives, fixing some of their flaws along the way.

Edited by Hadrien Benjamin Grasland

Merge request reports