Optimized code debugging

The mechanisms are:

  1. Atomics
    const _var = @atomicLoad(@TypeOf(some_var), &some_var, .seq_cst);
    
  2. doNotOptimizeAway See: How to use std.mem.doNotOptimizeAway?
  3. volatile Note: Benchmarking isDigit - #17 by andrewrk
3 Likes