comparison doc/manual.tex @ 1356:977901cb52cc

More detail on Especialize in the manual
author Adam Chlipala <adam@chlipala.net>
date Tue, 21 Dec 2010 14:01:27 -0500
parents 1b286f2309bc
children 32c8a3509369
comparison
equal deleted inserted replaced
1355:ccf1d445b794 1356:977901cb52cc
2227 2227
2228 Module system features are compiled away, through inlining of functor definitions at application sites. Afterward, most abstraction boundaries are broken, facilitating optimization. 2228 Module system features are compiled away, through inlining of functor definitions at application sites. Afterward, most abstraction boundaries are broken, facilitating optimization.
2229 2229
2230 \subsection{Especialize} 2230 \subsection{Especialize}
2231 2231
2232 Functions are specialized to particular argument patterns. This is an important trick for avoiding the need to maintain any closures at runtime. 2232 Functions are specialized to particular argument patterns. This is an important trick for avoiding the need to maintain any closures at runtime. Currently, specialization only happens for prefixes of a function's full list of parameters, so you may need to take care to put arguments of function types before other arguments. The optimizer will not be effective enough if you use arguments that mix functions and values that must be calculated at run-time. For instance, a tuple of a function and an integer counter would not lead to successful code generation; these should be split into separate arguments via currying.
2233 2233
2234 \subsection{Untangle} 2234 \subsection{Untangle}
2235 2235
2236 Remove unnecessary mutual recursion, splitting recursive groups into strongly-connected components. 2236 Remove unnecessary mutual recursion, splitting recursive groups into strongly-connected components.
2237 2237