Skip to main content

Mojo module

memory

Provides memory barrier utilities for preventing compiler optimizations.

This module includes the clobber_memory() function which acts as a memory fence to prevent the compiler from reordering or eliminating memory operations. This is essential for accurate benchmarking when memory access patterns need to be preserved exactly as written.

Functions

Was this page helpful?