3 ms·
Microbenchmarks specifically try to hold the rest of the world constant while measuring a microscopic piece of code, in the realms of countable cpu clock cycles
by barrkel 9y ago
Microbenchmarks specifically try to hold the rest of the world constant while measuring a microscopic piece of code, in the realms of countable cpu clock cycles. In that case, noise really is noise. And of course the data is of limited use.
Things like cache locality, branch prediction, prefetch etc. should be flushed out with a good microbenchmark prologue.
- scott_s 9y agoAgain, disagreed when the point of your technique is better cache and memory hierarchy performance. Much of my own work aims to perform better given the realities of modern systems. Trying to factor such things out removes the thing being measured!
- enqk 9y agoI don't think you can say that microbenchmarks are anywhere realistic. First because the machine workload is different while you run them. Second because the compiling or VM state is also quite different. A value of microbenchmarks is to establish a stable environment when a baseline can be set, where predictions can be tested. It's a development tool, not a qualification tool. You will have anyway to measure the real performance impact in the complete environment.