Difference between revisions of "Performance/Functions"

From HaskellWiki
Jump to navigation Jump to search
 
Line 3: Line 3:
 
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]

Revision as of 15:51, 10 January 2006

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?)