-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite and restructure JSON parser (#1343)
* Get rid of spontaneous lookahead * Spill fewer variables into object state * Optimize token and whitespaces reading * Separate fast and slow paths * Add optimistic key consumption optimization to leverage indexOf intrinsic * Parse numbers and booleans without allocations * Improve exception messages in few places * Optimize JsonReader further -- don't make conditional array lookups where they are not really necessary * Make consumeString inliner-friendly * Optimize strings handling * Replace handrolled char-array with StringBuilder, tweak it here and there * Always use optimistic path for strings * Properly handle slow-path from the middle of a string * Remove no longer used WriteMode fields * Rename JsonReader to JsonLExer and JsonParser to JsonTreeReader
- Loading branch information
Showing
25 changed files
with
923 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.