_benchmark_distribution() can be replaced by setup= keyword of @benchmark. Instead of standard deviation, standard error of the mean should be printed.
Benchmark results should be looked at after this replacement - there is some overhead in @benchmark, plus an incorrect choice between using symbols vs splicing arguments in this macro can change the results drastically.
To reduce the error, tests can be designed better - e.g. for divrem of multi-limb integers check several cases of n limbs by m limbs, instead of taking a random over the whole range (which, naturally ends up as maximum limbs by maximum limbs in most cases).
_benchmark_distribution()
can be replaced bysetup=
keyword of@benchmark
. Instead of standard deviation, standard error of the mean should be printed.Benchmark results should be looked at after this replacement - there is some overhead in
@benchmark
, plus an incorrect choice between using symbols vs splicing arguments in this macro can change the results drastically.To reduce the error, tests can be designed better - e.g. for
divrem
of multi-limb integers check several cases ofn
limbs bym
limbs, instead of taking a random over the whole range (which, naturally ends up as maximum limbs by maximum limbs in most cases).