1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-18 22:57:33 +02:00

support WhatIsNext

This commit is contained in:
Tao Wen
2016-12-10 14:34:36 +08:00
parent e66687e863
commit f98c2a4150
3 changed files with 54 additions and 6 deletions

View File

@ -95,7 +95,7 @@ func Benchmark_jsoniter_ascii(b *testing.B) {
iter := ParseString(`"hello, world!"`)
b.ResetTimer()
for n := 0; n < b.N; n++ {
iter.Reuse(iter.buf)
iter.ResetBytes(iter.buf)
iter.ReadString()
}
}
@ -104,7 +104,7 @@ func Benchmark_jsoniter_string_as_bytes(b *testing.B) {
iter := ParseString(`"hello, world!"`)
b.ResetTimer()
for n := 0; n < b.N; n++ {
iter.Reuse(iter.buf)
iter.ResetBytes(iter.buf)
iter.ReadStringAsBytes()
}
}