Mehdi Akiki

Posts tagged "cpu cache"

  • Published on

    Investigation · Part 19 of 20 · When the benchmark lies

    The Microbenchmark Won and the Program Got Slower

    Alone, a lookup table was four times faster than a division. In a loop that also used 1 to 8 MiB of its own counters, the same table made the whole loop 4 to 34 percent slower. The microbenchmark had the cache for itself, and the program had to share it.
  • Published on

    Investigation · Part 16 of 20 · When the benchmark lies

    When the Working Set No Longer Fits in Cache

    One step of i = a[i] costs 1.4 ns when the array fits in L1 and 114 ns when it is 128 MiB, the same instruction. I measured the steps on a P-core and an E-core, a sequential read of the same arrays, and why I could not show the effect of huge pages.