Hacker News new | ask | show | jobs
by stephc_int13 1151 days ago
The benchmark should not average the values but take the lowest.

I would not write a better explanation than Daniel Lemire on his blog:

https://lemire.me/blog/2023/04/06/are-your-memory-bound-benc...

2 comments

You also need to randomise the object code location across multiple builds.

I would not write a better explanation than Emery Berger speaks: https://youtu.be/r-TLSBdHe1A?t=10m41s Key: “Layout changes can shift performance by +/-40%”

Not sure it matters so much on small in-cache programs, but worth thinking about when profiling larger programs.

From that post:

> It is not possible, in a normal distribution, to be multiple times the standard deviation away from the mean. However, it happens much more easily with a log normal.

Should that read it is not _impossible_ otherwise it is quite wrong. I mean it's a gaussian probability distribution you sure can be several standard deviations away from the mean, admittedly at smaller and smaller probability