storablevector-0.2.8: Fast, packed, strict storable arrays with a list interface like ByteString

Safe HaskellSafe-Infered

Data.StorableVector.Lazy.Builder

Description

Build a lazy storable vector by incrementally adding an element. This is analogous to Data.Binary.Builder for Data.ByteString.Lazy.

Attention: This implementation is still almost 3 times slower than constructing a lazy storable vector using unfoldr in our Chorus speed test.

Synopsis

Documentation

data Builder a Source

Instances

toLazyStorableVector :: Storable a => ChunkSize -> Builder a -> Vector aSource

 toLazyStorableVector (ChunkSize 7) $ Data.Monoid.mconcat $ map put ['a'..'z']

put :: Storable a => a -> Builder aSource

flush :: Storable a => Builder aSource

Set a laziness break.