[commit: packages/bytestring] ghc-head: Implement fast decimal integer encoding. (92f19a5)

git at git.haskell.org git
Fri Oct 4 08:28:03 UTC 2013


Repository : ssh://git at git.haskell.org/bytestring

On branch  : ghc-head
Link       : http://git.haskell.org/packages/bytestring.git/commitdiff/92f19a5d94761042b44a433d7331107611e4d717

>---------------------------------------------------------------

commit 92f19a5d94761042b44a433d7331107611e4d717
Author: Simon Meier <simon.meier at erudify.com>
Date:   Tue Sep 17 17:39:16 2013 +0200

    Implement fast decimal integer encoding.
    
    Compared to 'blaze-textual' and the Integer 'Show' instance the 'integerDec'
    builder is 2x faster for small integers that fit into a machine word, and it
    is 4x faster for large integers. This performance improvement speeds-up the
    encoding performance of libraries like 'aeson' that use 'Integer's to
    represent numbers.


>---------------------------------------------------------------

92f19a5d94761042b44a433d7331107611e4d717
 Data/ByteString/Builder/ASCII.hs               |  121 ++++++++++++++++++++++--
 Data/ByteString/Builder/Extra.hs               |    1 +
 bytestring.cabal                               |    9 ++
 cbits/itoa.c                                   |   44 +++++++++
 tests/builder/Data/ByteString/Builder/Tests.hs |    4 +-
 tests/bytestring-tests.cabal                   |    9 ++
 6 files changed, 179 insertions(+), 9 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 92f19a5d94761042b44a433d7331107611e4d717



More information about the ghc-commits mailing list