GaloisInc / json

Haskell JSON library
Other
27 stars 10 forks source link

Avoid allocating Rationals well outside the range of normal doubles #16

Closed glguy closed 1 year ago

glguy commented 1 year ago

We'll need to remove the use of readFloat, too. It's slow to parse large exponents

david-christiansen commented 1 year ago

Do you have an quick example of what you mean by this?

glguy commented 1 year ago

Do you have an quick example of what you mean by this?

Try this in GHCi

(Numeric.readFloat :: ReadS Double) "1e1000000000"

This library has two different JSON parsers. This PR fixes one of them so far.

david-christiansen commented 1 year ago

Thanks!

Den tors. 13. jul. 2023 kl. 08.21 skrev Eric Mertens < @.***>:

Do you have an quick example of what you mean by this?

Try this in GHCi

(Numeric.readFloat :: ReadS Double) "1e1000000000"

— Reply to this email directly, view it on GitHub https://github.com/GaloisInc/json/pull/16#issuecomment-1633622257, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA4FARA6VJHE6KETJ56HZ3XP6HX5ANCNFSM6AAAAAAZ46GZDI . You are receiving this because you commented.Message ID: @.***>