Handling sequential data

The standard list,[], is the most used data structure for sequential data. It has reasonable performance, but when processing multiple small values, say Chars, the overhead of a linked list might be too much. Often, the convenient nature of [] is convincing enough.

The wide range of list functions in Data.List are hand-optimized and many are subject to fusion. List fusion, as it is currently implemented using the foldr/build fusion transformation, is subtly different from stream fusion employed in ByteString and Text (concatMap is a bit problematic with traditional stream fusion). Still, the end result is pretty much the same; in a long pipeline of list functions, intermediate lists will usually not be constructed.

Say we ...

Get Haskell High Performance Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.