Mehdi Akiki

Writing archive

Everything published under Writing, newest first. Each entry is labelled as part of an investigation, an article or reference. Short engineering notes have their own archive.

  • Published on

    Investigation · Part 13 of 20 · When the benchmark lies

    Compare Two Versions by Interleaving the Runs

    I compared a program with an identical copy of itself, and in 3 of 5 experiments the copy was significantly faster or slower. Running the two versions in blocks measured the moment, not the version. Interleaved runs found no difference, and found a real 4% change every time.
  • Published on

    Investigation · Part 13 of 20 · From source to a running process

    Why the First Touch of Memory Is Slow: Demand Paging Measured

    Mapping 1 GiB takes no time, the first write to each page costs about a microsecond, and the second write 16 nanoseconds. I measured faults with and without huge pages, MAP_POPULATE, calloc and Rust vectors, and twice the compiler removed the work I wanted to measure.