This is backward compatible (that why I hacked it with generics).
I should probably make generic versions of the builders too.
Results:
name old time/op new time/op delta
PB-12 730ns ± 5% 255ns ± 2% -65.04% (p=0.000 n=9+10)
name old alloc/op new alloc/op delta
PB-12 224B ± 0% 0B -100.00% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
PB-12 4.00 ± 0% 0.00 -100.00% (p=0.000 n=10+10)
This is backward compatible (that why I hacked it with generics). I should probably make generic versions of the builders too.
Results: