-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address issues 81+83, avoid too-verbose num reprs
Decimal numbers have often been too verbose since v8.1. Unfortunately I couldn't find an algorithm that simultaneously * avoids loss of precision on numbers where the most precise 64-bit floating point representation has at least 16 digits of precision (e.g., -1.79769313486232E+308) * while also not being too verbose with many other numbers (e.g., writing 11.11 as 11.099999999999999) * and does not have noticeably worse performance. In fact, my new algorithm is about 100% slower than the algorithm used since this commit (7522a20) and will, in the limiting case where all numbers require at least 16 digits of precision, be closer to 200% slower. Obviously most real JSON documents are not just long arrays of decimal numbers, so the actual performance loss will generally be less than that.
- Loading branch information
1 parent
9f96580
commit f259bf6
Showing
9 changed files
with
94 additions
and
81 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.