1
0
mirror of https://github.com/json-iterator/go.git synced 2025-07-12 23:50:19 +02:00

add ConfigFastest

This commit is contained in:
Tao Wen
2017-06-17 10:21:37 +08:00
parent 69bc64b6d8
commit b31b1301e2
28 changed files with 187 additions and 183 deletions

@ -15,7 +15,7 @@ type Level2 struct {
}
func Test_nested(t *testing.T) {
iter := ParseString(ConfigOfDefault, `{"hello": [{"world": "value1"}, {"world": "value2"}]}`)
iter := ParseString(ConfigDefault, `{"hello": [{"world": "value1"}, {"world": "value2"}]}`)
l1 := Level1{}
for l1Field := iter.ReadObject(); l1Field != ""; l1Field = iter.ReadObject() {
switch l1Field {
@ -50,7 +50,7 @@ func Test_nested(t *testing.T) {
func Benchmark_jsoniter_nested(b *testing.B) {
for n := 0; n < b.N; n++ {
iter := ParseString(ConfigOfDefault, `{"hello": [{"world": "value1"}, {"world": "value2"}]}`)
iter := ParseString(ConfigDefault, `{"hello": [{"world": "value1"}, {"world": "value2"}]}`)
l1 := Level1{}
for l1Field := iter.ReadObject(); l1Field != ""; l1Field = iter.ReadObject() {
switch l1Field {