nucypher / DarkIntegers.jl

A modulo arithmetic toolbox for integers and polynomials
https://nucypher.github.io/DarkIntegers.jl
GNU General Public License v3.0
7 stars 2 forks source link

Remove `_benchmark_distribution()` from `test/TestUtils.jl` #1

Open fjarri opened 4 years ago

fjarri commented 4 years ago

_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).