restore special case parsing of numbers for in memory JSON #265
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.
I was trying to figure out why the
from
andto
variables where threaded through the number parsing routines since it seemed like they were always1
andlength(ps.utf8array)
respectively. Turns out there is a special cased number parser for in-memory JSON that is being failed to be dispatched to after the introduction ofParserContext
(#224 cc @kmsquire).This restores the special case for a nice performance boost:
Before:
After:
Arguably the
parse_number(pc::ParserContext, ps::ParserState)
should be changed toparse_number(pc::ParserContext, ps::StreamingParserState)
to avoid this happening again.