MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / black_box

Function black_box

modules/benchmarks-cpp/src/common.h:10–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8// Black box function to prevent compiler optimizations during benchmarking
9template<typename T>
10inline void black_box(const T& value) {
11 // Use volatile to prevent the compiler from optimizing away the value
12 volatile const void* ptr = &value;
13 (void)ptr;
14}
15
16// Load configuration struct - defines test data sizes for benchmarks
17struct Load {

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…