(let [target__10357 'F
fail__10358 (fn []
(let [?X target__10357]
?X))]
(letfn [(state__10359 []
(case target__10357
X '[F - ((X) + X) + F (+ F X) - X]
F '[F F]
;; else
(fail__10358)))]
(state__10359)))
and even better if we could
(let [target__10357 'F
fail__10358 (fn []
(let [?X target__10357]
?X))]
(case target__10357
X '[F - ((X) + X) + F (+ F X) - X]
F '[F F]
;; else
(fail__10358)))
The difference in overall time execution between each is roughly a millisecond or two. That may not sound like much but when you consider say, an L-System, where rewrite rules may need to be applied thousands of times, it can add up.
When compiling the :branch we should be able to check for any subsequence of :check-lit ops of length two or more and compile them as case expressions. IR nodes to the right of the subsequence should be compiled as the "else" part of the case.
We can improve the code generated around sequences of literal checks by compiling them to a
case
expression. Currently the formcompiles to something like
but would be more efficient as
and even better if we could
The difference in overall time execution between each is roughly a millisecond or two. That may not sound like much but when you consider say, an L-System, where rewrite rules may need to be applied thousands of times, it can add up.
The IR for the code above looks something like
When compiling the
:branch
we should be able to check for any subsequence of:check-lit
ops of length two or more and compile them ascase
expressions. IR nodes to the right of the subsequence should be compiled as the "else" part of thecase
.