Please sign in to comment.
json: speed up JSON parser
Speed up JSON parsing (usually around x4 to x8) by avoiding regexp matching and using more direct byte and character operations. Along similar lines, compute parsed numbers directly instead of converting to a string and then using `string->number`. The revised reader behaves differently only in the case of a bad input stream, where it may consume more bytes from the stream than the old one due to eagerly reading bytes instead of tentatively matching peeked bytes. Also, a UTF-8 decoding error is just `exn:fail` like other input-parsing errors, and not `exn:fail:contract`.
- Loading branch information...
Showing with 286 additions and 75 deletions.
Oops, something went wrong.