Hide a value from the optimizer so it cannot shape the following code.
Declared in <folly/BenchmarkUtil.h>
template<typename T>
void
makeUnpredictable(T& datum);
Call makeUnpredictable(var) when you don't want the optimizer to use its knowledge of var to shape the following code. This is useful when constant propagation or power reduction is possible during your benchmark but not in real use cases.
| Name | Description |
|---|---|
| datum | The value to make opaque to the optimizer. |