Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Donald Bruce Stewart <dons <at> cse.unsw.edu.au>
Subject: ANNOUNCE: fps -- fast packed strings
Newsgroups: gmane.comp.lang.haskell.general
Date: Thursday 25th August 2005 04:10:44 UTC (over 12 years ago)
Hey.

I've cabalised the FastPackedString module from darcs, used in h4sh, as the
`fps' library.

fps provides mmapped and malloc'd packed strings (byte arrays held by a
ForeignPtr), along with a list interface to these strings. It lets you do
extremely fast IO in Haskell. For example, the shell identity function
written
in Haskell (i):

    $ time cat 200M > /dev/null
    0.00s user 0.19s system 2% cpu 6.481 total
    $ time i 200M > /dev/null
    0.00s user 0.00s system 0% cpu 0.172 total

    $ time cat 200M > /tmp/f   
    0.00s user 0.38s system 1% cpu 27.932 total
    $ time i 200M > /tmp/f
    0.00s user 0.48s system 7% cpu 6.454 total    

The FastPackedString module was originally written by Bryan O'Sullivan, it
was
rewritten to use UArray by Simon Marlow, then rewritten and extended to
support
slices, mmapping, ForeignPtrs and lots of other stuff by David Roundy and
the
darcs team. This version fixes a couple of bugs related to conformance
to List, adds a testsuite, and makes the code conveniently available as
a cabalised library.

Get it:
                   http://www.cse.unsw.edu.au/~dons/fps.html
              darcs get http://www.cse.unsw.edu.au/~dons/code/fps
    
-- Don Stewart
 
CD: 15ms