MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / benchEncoderSvarint

Function benchEncoderSvarint

internal/proto/dynamic_test.go:19–25  ·  view source on GitHub ↗
(b *testing.B, v int64)

Source from the content-addressed store, hash-verified

17}
18
19func benchEncoderSvarint(b *testing.B, v int64) {
20 e := encoder{}
21 for i := 0; i < b.N; i++ {
22 e.buf = e.buf[:0]
23 e.svarint(v)
24 }
25}
26
27func Benchmark_encoder_uvarint(b *testing.B) {
28 b.Run("short", func(b *testing.B) {

Callers 1

Calls 1

svarintMethod · 0.95

Tested by

no test coverage detected