News for hackers. Stuff that matters.
Re:Practical Go benchmarks by i0exception on Wednesday March 07, 2018 @03:54AM (#16535140)
His use of b.N is correct. The code you have is simply multiplying N by 100 with the inner for loop - so your times are 100x of what each "concat" operation (+,WriteString) takes.

You are also allocating a new string/buffer/builder for every run - which is not useful if you want to just benchmark concat.

There are no comments on this comment yet.