Performance/Functions

From HaskellWiki
Jump to navigation Jump to search
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

Force functions to be inlined

Haskell has an INLINE pragma that can be used to indicate to the compiler that you would like a function's definition to be inlined at each call site. (not all compilers respect the INLINE pragma; GHC does, any others?)