MCPcopy Create free account
hub / github.com/buger/jsonparser / BenchmarkTokenEnd_LongNumber

Function BenchmarkTokenEnd_LongNumber

optimization_bench_test.go:64–72  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

62}
63
64func BenchmarkTokenEnd_LongNumber(b *testing.B) {
65 // A 64-digit number — exercises the SIMD scan.
66 data := []byte(strings.Repeat("1", 64) + `,`)
67 b.SetBytes(int64(len(data)))
68 b.ResetTimer()
69 for i := 0; i < b.N; i++ {
70 _ = tokenEnd(data)
71 }
72}
73
74func BenchmarkTokenEnd_Boolean(b *testing.B) {
75 data := []byte(`true,`)

Callers

nothing calls this directly

Calls 1

tokenEndFunction · 0.85

Tested by

no test coverage detected