Skip to main content

Mojo module

compiler

Provides compiler hints to prevent optimization of benchmark code.

This module includes utilities that prevent the compiler from optimizing away code being benchmarked. The keep() function ensures that values are not eliminated during dead code elimination, which is essential for accurate performance measurements.

Functions

  • keep: Provides a hint to the compiler to not optimize the variable use away.

Was this page helpful?