(common-subexpression-elimination x
&
{:keys [symbol-generator]
:or {symbol-generator gensym}})
Given an expression and a table of common subexpressions, create a let statement which assigns the subexpressions to the values of dummy variables generated for the purpose of holding these values; the body of the let statement will be x with the subexpressions replaced by the dummy variables.
Given an expression and a table of common subexpressions, create a let statement which assigns the subexpressions to the values of dummy variables generated for the purpose of holding these values; the body of the let statement will be x with the subexpressions replaced by the dummy variables.
(compile-state-function f parameters initial-state)
(compile-univariate-function f)
(extract-common-subexpressions expression symbol-generator continue)
Considers an S-expression from the point of view of optimizing its evaluation by isolating common subexpressions into auxiliary variables. The continuation is called with two arguments: a new equivalent expression with possibly some subexpressions replaced by new variables (delivered by the supplied generator) and a seq of pairs of [aux variable, subexpression] used to reconstitute the value.
Considers an S-expression from the point of view of optimizing its evaluation by isolating common subexpressions into auxiliary variables. The continuation is called with two arguments: a new equivalent expression with possibly some subexpressions replaced by new variables (delivered by the supplied generator) and a seq of pairs of [aux variable, subexpression] used to reconstitute the value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close