minio / simdjson-go

Golang port of simdjson: parsing gigabytes of JSON per second
Apache License 2.0
1.82k stars 88 forks source link

Simplify and speed up Object FindKey #9

Closed klauspost closed 4 years ago

klauspost commented 4 years ago

Use the length to reject candidates a bit quicker.

λ benchcmp before.txt after.txt
benchmark                                         old ns/op     new ns/op     delta
BenchmarkNdjsonWarmCountStarWithWhere/iter-12     272527765     251116358     -7.86%

benchmark                                         old MB/s           new MB/s           speedup
BenchmarkNdjsonWarmCountStarWithWhere/iter-12     1341.11            1455.46            1.09x

countRawTapeWhere is broken. I don't know if there is any point in fixing it. Old benchmark was broken.

fwessels commented 4 years ago

@klauspost will take a look at the benchmark error