Hypothetical example: Say I'm writing an application that uses "rsc.io/quote"
and I discover a bug in that package that breaks my software. I would of
course clone the quote repository, add a test that demonstrates the bug,
fix the bug, and submit a patch to the maintainer.
After making the fix bu
b *testing.B) {
> sum = 0
>
> for i := 0; i < b.N; i++ {
> sum += PopCount(0x1234567890abcdef)
> }
> }
>
> As you can see from the objdump, BenchmarkPopCountAlive code is not
> eliminated.
>
> For details, see the popcount.txt attachment.
>
This is not a serious problem, but it surprised me. (By the way, how can I
post a message with code formatting?)
I'd like to create table-driven benchmarks:
https://blog.golang.org/subtests.
To that end, I started with code from *The Go Programming Language*:
// PopCount is based on an examp