haskell / double-conversion

A fast Haskell library for converting between double precision floating point numbers and text strings. It is implemented as a binding to the V8-derived C++ double-conversion library.
http://hackage.haskell.org/package/double-conversion
Other
15 stars 33 forks source link

expose functions from string→double? #35

Open unhammer opened 2 years ago

unhammer commented 2 years ago

IIUC, this only exposes functions from doubles to strings, not the other way around, but https://github.com/google/double-conversion/blob/master/double-conversion/string-to-double.h has functions from string-to-double – would it make sense to include both directions?

The default read is pretty slow on doubles; there is bytestring-lexing which is faster than default, but I'm guessing double-conversion could be even faster – or perhaps fast_float would be a better option?

Haskell-mouse commented 1 year ago

Thanks, @unhammer for pointing this out. I will think about it and maybe try to make performance tests.