Writing benchmarks is not easy. Nonius simplifies certain aspects but you'll always need to take care about various aspects. Understanding a few things about the way nonius runs your code will be very helpful when writing your benchmarks.
First off, let's go over some terminology that will be used throughout.
- User code: user code is the code that the user provides to be measured.
- Run: one run is one execution of the user code.