First PR to Go

I was happy to create my first PR targetting the Go language repository.

It is not a big change, but it is something for Go's builtin microbenchmark framework. Over the years I grew used to JMH. And I took many features in it for granted. It takes to look at another language's ecosystem to appreciate the gem you had.

In Go, one can run benchmarks. But by default each function is called only once. And nobody should be satisfied with just a single measure. There is a parameter to specify the number of reruns, but when used it leads to a wall of numbers.

With some script it is, of course, possible to compute the mean and the confidence interval, but some precision would be inevitably lost.

So my small change added an output of mean and 95% confidence interval to the test.bench output when number of reruns is 5 or greater.

Curious to see if it will be accepted.

Posted On

Category:

Tags: /