Mehdi Akiki

Posts tagged "performance"

  • Published on

    Investigation · Part 8 of 20 · When the benchmark lies

    The Average Hides the Slow Requests

    I timed four million single Vec::push calls: mean 22.8 ns, slowest 315,684 ns. The slow ones were not the reallocations but page faults, and huge pages made them bigger. Then a simulated request handler where the mean is a time that no request had.
  • Published on

    Investigation · Part 7 of 20 · When the benchmark lies

    The Benchmark Ran on an Efficiency Core

    On a laptop with two kinds of cores, I measured the same benchmark on a P-core and on an E-core, without taskset, and with two threads on one core. The E-core needed more cycles, not only a lower clock, and a busy sibling thread made a P-core as slow as an E-core.
  • Published on

    Investigation · Part 6 of 20 · When the benchmark lies

    My Laptop Changed Its CPU Speed During the Benchmark

    I measured the work of one loop and the clock of its core at the same time, for one minute. The clock moved between 3.3 and 4.2 GHz without any change in my program, and the work per cycle stayed the same in every phase. Here is the trace, and what I can do about it on a laptop.
  • Published on
    A measured additive-increase, multiplicative-decrease controller for finding useful API concurrency while respecting throttling, latency, retries, and tenant isolation.
  • Published on

    Investigation · Part 9 of 10 · Types under the hood

    Runtime Type Tags: What Dynamic Languages Keep That Static Ones Throw Away

    A Python integer with the value 1 takes 28 bytes, and a million of them cost 36 MB where Rust would use 4. I expected mixed arrays to be slow in V8 and they were not. The cost that did show up was object shape, and it arrives as a cliff at the fifth shape.