New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for large integers in Json decoder #352

Merged
merged 3 commits into from Aug 16, 2015

Conversation

Projects
None yet
3 participants
@ajhager
Contributor

ajhager commented Aug 16, 2015

The current Json int decoder only recognizes 32 bit integers. This PR provides a small test suite for the int decoder and a new decoder that works correctly with large numbers.

This benchmark (where 'original' is the old code and 'blend' is the code from this PR) shows (on OSX with Chrome at least) that the new code is slightly slower in the case that most decoded values are not ints, and nearly equivalent speed in the typical case when most values are ints.

ref #153 and #337

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Aug 16, 2015

Member

Looks great to me, thank you! :D

@krisajenkins, does this have the behavior you were looking for?

Member

evancz commented Aug 16, 2015

Looks great to me, thank you! :D

@krisajenkins, does this have the behavior you were looking for?

evancz pushed a commit that referenced this pull request Aug 16, 2015

Merge pull request #352 from ElmCast/int-json-decode
Add support for large integers in Json decoder

@evancz evancz merged commit d1a0345 into elm:master Aug 16, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@krisajenkins

This comment has been minimized.

Show comment
Hide comment
@krisajenkins

krisajenkins Aug 25, 2015

Contributor

Sorry for the delay in confirming - yes, this fix works for me. Thanks very much to both of you. :-)

Contributor

krisajenkins commented Aug 25, 2015

Sorry for the delay in confirming - yes, this fix works for me. Thanks very much to both of you. :-)

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Aug 25, 2015

Member

Great, thanks everyone!

Member

evancz commented Aug 25, 2015

Great, thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment