You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-21 23:07:33 +02:00
optimize read float
This commit is contained in:
@ -21,6 +21,14 @@ func Test_float64_1_dot_1(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func Test_float32_1_dot_1_comma(t *testing.T) {
|
||||
iter := ParseString(`1.1,`)
|
||||
val := iter.ReadFloat32()
|
||||
if val != 1.1 {
|
||||
t.Fatal(val)
|
||||
}
|
||||
}
|
||||
|
||||
func Benchmark_jsoniter_float(b *testing.B) {
|
||||
for n := 0; n < b.N; n++ {
|
||||
iter := ParseString(`1.1`)
|
||||
|
Reference in New Issue
Block a user