Mehdi Akiki

Posts tagged "cargo"

  • Published on

    Investigation · Part 2 of 20 · When the benchmark lies

    A Debug Build Measures a Different Program

    A test called score_is_fast measured 44,646 ns per call under cargo test and 1,136 ns with --release, one run each. I compare four optimization levels in Rust and two in C, and I show in the assembly what a debug build really measures.