Performance/Functions
From HaskellWiki
< Performance(Difference between revisions)
(+cat) |
|||
| (3 intermediate revisions 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 | + | * GHC's documentation on the [http://www.haskell.org/ghc/docs/latest/html/users_guide/pragmas.html#inline-pragma INLINE pragma] |
Current revision
| Haskell Performance Resource
Constructs: Techniques: |
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?)
- GHC's documentation on the INLINE pragma
