Performance/IO

From HaskellWiki
< Performance
Revision as of 06:16, 30 August 2009 by Steve C (talk | contribs) (Expand on Library/Streams description.)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Haskell Performance Resource

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

Techniques:
Strictness - Laziness
Avoiding space leaks
Accumulating parameter

Implementation-Specific:
GHC - nhc98 - Hugs
Yhc - JHC

I/O

If the standard lazy IO operations are proving to be a bottleneck, buffer-based IO is an alternative (hGetBuf/hPutBuf). This can be particularly effective when combined with packed strings (see wc).

Some external libraries also provide memory mapped IO.

Library/Streams is a new (in 2006) approach to I/O, which claims to be 5-10 times faster on some operations than handle-based IO.