Fast conversion between single and double precision floating point and text.
A library that performs fast, accurate conversion between floating point and text.
This library is implemented as bindings to the C++ double-conversion
library written by Florian Loitsch at Google: https://github.com/floitsch/double-conversion.
Now it can convert single precision numbers, and also it can create Builder, instead of bytestring or text.
The Text
versions of these functions are about 30 times faster than the default show
implementation for the Double
type.
The ByteString
versions are have very close speed to the Text
versions;
Builder versions (both for Text and Bytestring) are slower on single value, but they are much faster on large number of values (up to 20x faster on list with 20000 doubles).
As a final note, be aware that the bytestring-show
package is about 50% slower than simply using show
.