I've added the same function twice and run bench. Most of the time bench told me there is a difference between the two functions around 0.7-1%.
I dumped and loaded the values in GNU R, and I got similar results with t.test (i.e. that the mean of the difference is not 0).
But if I compute the 95% prediction interval (as mean +- 1.96 * stdev) I get that they overlap quite a lot, even if the confidence interval of the mean doesn't:
[1.29918, 1.45882]
[1.25772, 1.48428]
I think that comparing the 95% prediction intervals of the measurements is better than
testing whether the mean of the difference is 0, because if the difference is within measurement error/noise it is probably not practically significant.
Example output from bench (increased precision to %.4f):
Measuring: System Clock
Warming up
Estimating clock resolution (1.1093 us)
Estimating cost of timer call (69.7196 ns)
Benchmarking: rand
Ran 1 iterations in 1.6859 ms
Collecting 1000 samples, 1 iterations each, estimated time: 1.6859 s
N: 1000 Inter-quartile width:9.0599 us, Full range: (1.3508 ms,1.7518 ms)
Outliers: 14 (1.4%) Low Mild, 28 (2.8%) High Mild, 43 (4.3%) High Severe,
mean: 1.3790 ms, 95% CI: (1.3757 ms, 1.3810 ms)
std.dev.: 40.7229 us, 95% CI: (29.2276 us, 46.3408 us)
Benchmarking: rand
Ran 1 iterations in 1.4322 ms
Collecting 1000 samples, 1 iterations each, estimated time: 1.4322 s
N: 1000 Inter-quartile width:8.8215 us, Full range: (1.3420 ms,2.6969 ms)
Outliers: 26 (2.6%) High Mild, 46 (4.6%) High Severe,
mean: 1.3710 ms, 95% CI: (1.3671 ms, 1.3739 ms)
std.dev.: 57.7947 us, 95% CI: (31.3308 us, 83.0438 us)
I've added the same function twice and run bench. Most of the time bench told me there is a difference between the two functions around 0.7-1%.
I dumped and loaded the values in GNU R, and I got similar results with t.test (i.e. that the mean of the difference is not 0).
But if I compute the 95% prediction interval (as mean +- 1.96 * stdev) I get that they overlap quite a lot, even if the confidence interval of the mean doesn't:
[1.29918, 1.45882]
[1.25772, 1.48428]
I think that comparing the 95% prediction intervals of the measurements is better than
testing whether the mean of the difference is 0, because if the difference is within measurement error/noise it is probably not practically significant.
Example output from bench (increased precision to %.4f):
Measuring: System Clock
Warming up
Estimating clock resolution (1.1093 us)
Estimating cost of timer call (69.7196 ns)
Benchmarking: rand
Ran 1 iterations in 1.6859 ms
Collecting 1000 samples, 1 iterations each, estimated time: 1.6859 s
N: 1000 Inter-quartile width:9.0599 us, Full range: (1.3508 ms,1.7518 ms)
Outliers: 14 (1.4%) Low Mild, 28 (2.8%) High Mild, 43 (4.3%) High Severe,
mean: 1.3790 ms, 95% CI: (1.3757 ms, 1.3810 ms)
std.dev.: 40.7229 us, 95% CI: (29.2276 us, 46.3408 us)
Benchmarking: rand
Ran 1 iterations in 1.4322 ms
Collecting 1000 samples, 1 iterations each, estimated time: 1.4322 s
N: 1000 Inter-quartile width:8.8215 us, Full range: (1.3420 ms,2.6969 ms)
Outliers: 26 (2.6%) High Mild, 46 (4.6%) High Severe,
mean: 1.3710 ms, 95% CI: (1.3671 ms, 1.3739 ms)
std.dev.: 57.7947 us, 95% CI: (31.3308 us, 83.0438 us)