Personal tools

Performance/Functions

From HaskellWiki

< Performance(Difference between revisions)
Jump to: navigation, search
 
(+cat)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  +
{{Performance infobox}}
  +
[[Category:Performance|Functions]]
 
== Force functions to be inlined ==
 
== 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?)
 
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?)
   
* GHC's documentation on the [[http://www.haskell.org/ghc/docs/latest/html/users_guide/pragmas.html#inline-pragma INLINE pragma]]
+
* GHC's documentation on the [http://www.haskell.org/ghc/docs/latest/html/users_guide/pragmas.html#inline-pragma INLINE pragma]

Latest revision as of 11:28, 13 January 2007

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

[edit] 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?)