Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ BenchmarkDecoderNextToken/pkgjson/sample.json.gz-16 2032
BenchmarkDecoderNextToken/encodingjson/sample.json.gz-16 332 3574484 ns/op 192.33 MB/s 759685 B/op 26643 allocs/op
```

Decoding into an `interface{}` this package is 40-50% faster than `encoding/json`:
Decoding into an `any` this package is 40-50% faster than `encoding/json`:
```
BenchmarkDecoderDecodeInterfaceAny/pkgjson/canada.json.gz-16 43 27181309 ns/op 82.82 MB/s 8747225 B/op 281408 allocs/op
BenchmarkDecoderDecodeInterfaceAny/encodingjson/canada.json.gz-16 30 36930290 ns/op 60.95 MB/s 20647699 B/op 392553 allocs/op
Expand Down
2 changes: 1 addition & 1 deletion fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func Fuzz(data []byte) int {
}
return 0
}
var i interface{}
var i any
dec = NewDecoder(bytes.NewReader(data))
err := dec.Decode(&i)
if err != nil {
Expand Down