MCPcopy Create free account
hub / github.com/egonelbre/exp / BenchmarkByte_byte

Function BenchmarkByte_byte

bench/bulkencoder/encoder_test.go:134–142  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

132}
133
134func BenchmarkByte_byte(b *testing.B) {
135 enc := NewByteEncoder(N)
136 for k := 0; k < b.N; k++ {
137 enc.Reset()
138 for i := 0; i < N; i++ {
139 enc.WriteByte(byte(i))
140 }
141 }
142}
143
144func BenchmarkByte_4xbyte(b *testing.B) {
145 enc := NewByteEncoder(4 * N)

Callers

nothing calls this directly

Calls 3

ResetMethod · 0.95
WriteByteMethod · 0.95
NewByteEncoderFunction · 0.85

Tested by

no test coverage detected