[Haskell-cafe] ANN: bytestring-lexing 0.4.2

wren ng thornton wren at freegeek.org
Thu Mar 21 06:17:43 CET 2013


--------------------------------------------
-- bytestring-lexing 0.4.2
--------------------------------------------

The bytestring-lexing package offers efficient reading and packing of
common types like Double and Integral types.


--------------------------------------------
-- Changes (since 0.4.0)
--------------------------------------------

* Faster implementation of packDecimal.

Inspired by [1] I applied the same optimizations to the ByteString
implementation of packDecimal. According to the benchmarks I have on hand
the new version is about 1.3x faster than the old version. So the
difference isn't nearly as impressive; but it's not trivial either.


* Added buffer overflow check for asHexadecimal.

This only matters if you try converting a ByteString longer than (maxBound
`quot` 2 ::Int). I forget if the old version segfaulted or what; but now
you get an error message about trying to allocate a buffer that's too
large.


[1]
<http://www.serpentine.com/blog/2013/03/20/whats-good-for-c-is-good-for-haskell/>

--------------------------------------------
-- Links
--------------------------------------------

Homepage:
    http://code.haskell.org/~wren/

Hackage:
    http://hackage.haskell.org/package/bytestring-lexing

Darcs:
    http://community.haskell.org/~wren/bytestring-lexing

Haddock (Darcs version):
    http://community.haskell.org/~wren/bytestring-lexing/dist/doc/html/bytestring-lexing

-- 
Live well,
~wren




More information about the Haskell-Cafe mailing list