simdjson inlining and idiomaticity in benchmark #134
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This doesn't really make simdjson any faster than BSON or other formats, but it does bring it back in line with my expectations around performance :) After this, canada.json is the same or faster than yyjson on my machine (but only by pennies!), and remains faster on the other benchmarks.
The two changes that made the difference:
I also removed some unnecessary boilerplate .value() and .get_array/object() methods.
NOTE: simdjson could get some small perf gains if
rfl::Literal
took a string_view constructor; the fact that it takes astd::string
means we're forced to allocate every time we see atype
, when all it really needs to do is compare the string to a static list and put the integer index in there. This seems like it would a generally positive change to reflect-cpp anyway :)