You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-15 22:50:24 +02:00
use specific type
This commit is contained in:
@ -285,12 +285,12 @@ type StructOfTagOne struct {
|
||||
func Benchmark_jsoniter_reflect(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
for n := 0; n < b.N; n++ {
|
||||
//iter := ParseString(`{"field3": "100"}`)
|
||||
//struct_ := StructOfTagOne{}
|
||||
//iter.Read(&struct_)
|
||||
iter := ParseString(`[1,2,3]`)
|
||||
var array []int
|
||||
iter.Read(&array)
|
||||
iter := ParseString(`{"field3": "100"}`)
|
||||
struct_ := StructOfTagOne{}
|
||||
iter.Read(&struct_)
|
||||
//iter := ParseString(`[1,2,3]`)
|
||||
//var array []int
|
||||
//iter.Read(&array)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user