-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: simple simdjson solution with 30% speed increase #7316
Conversation
Deploy preview for dgraph-docs ready! Built with commit 06cb2f8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r3.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @vvbalaji-dgraph)
The only remaining issue is passing this test expecting an overflow error from a JSON number which just so happens to be the exact same number from Jepsen's 2018 analysis of Dgraph where the number automatically gets converted into a Unfortunately |
This is a much simpler version of #7315 with reasonable speed improvement.
I've made
FastParseJSON
the default JSON parser (replacingencoding/json
) and ifsimdjson.SupportedCPU()
returns false we fallback toencoding/json
.NOTE: This shouldn't be merged until simdjson-go merges this PR fixing number parsing issues. I'm in contact with the maintainer and it should be merged this weekend. If not, we can fork.
This change is