[go-nuts] Using a local copy of an external package?

2021-08-26 Thread Paul S. R. Chisholm
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

[go-nuts] Re: Table-driven benchmarks defeat inlining

2021-06-06 Thread Paul S. R. Chisholm
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. >

[go-nuts] Table-driven benchmarks defeat inlining

2021-05-31 Thread Paul S. R. Chisholm
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