DoNotOptimise¶
Contains functions preventing some compiler optimisations, namely dead code removal. This is useful for benchmarking purposes.
Constructors¶
create¶
Returns¶
- DoNotOptimise val^
Public Functions¶
apply[A: A]¶
Prevent the compiler from optimising out obj and any computation it is derived from. This doesn't prevent constant propagation.
Parameters¶
- obj: A
Returns¶
- None val
observe¶
Prevent the compiler from optimising out writes to an object marked by the apply function.
Returns¶
- None val
eq¶
Parameters¶
- that: DoNotOptimise val
Returns¶
- Bool val
ne¶
Parameters¶
- that: DoNotOptimise val
Returns¶
- Bool val