From HaskellWiki
< Performance
Revision as of 11:05, 20 February 2006 by Simonmar (talk | contribs)

Jump to: navigation, search
Haskell Performance Resource

Data Types - Functions
Overloading - FFI - Arrays
Strings - Integers - I/O
Floating point - Concurrency
Modules - Monads

Strictness - Laziness
Avoiding space leaks
Accumulating parameter

GHC - nhc98 - Hugs
Yhc - JHC


Sometimes the cost of representing strings as lists of Char can be too much. In this case, you can instead use packed strings. There are a number of options:

  • The standard Data.PackedString type
  • One of the newer packed string libraries, for example FastPackedString
  • Unboxed arrays of Word8 or Char
  • Ptrs to foreign malloced Word8 buffers

The packed string libraries have the benefit over arrays of Word8 or Char types, in that they provide the usual list-like operations.