builtin DoNotOptimise - tadashi9e/gmp4pony GitHub Wiki
Contains functions preventing some compiler optimisations, namely dead code removal. This is useful for benchmarking purposes.
primitive val DoNotOptimisenew val create()
: DoNotOptimise val^- DoNotOptimise val^
Prevent the compiler from optimising out obj and any computation it is derived from. This doesn't prevent constant propagation.
fun box apply[A: A](
obj: A)
: None val- obj: A
- None val
Prevent the compiler from optimising out writes to an object marked by the apply function.
fun box observe()
: None val- None val
fun box eq(
that: DoNotOptimise val)
: Bool val- that: DoNotOptimise val
- Bool val
fun box ne(
that: DoNotOptimise val)
: Bool val- that: DoNotOptimise val
- Bool val