Liking cljdoc? Tell your friends :D

sicmutils.numerical.compile


common-subexpression-eliminationclj

(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.
sourceraw docstring

compile-state-functionclj

(compile-state-function f parameters initial-state)
source

compile-univariate-functionclj

(compile-univariate-function f)
source

extract-common-subexpressionsclj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close