Constant folding in Core could be better
Constant folding in Core is still a bit feeble. For example, when staring at the code for
nofib/shootout/k-nucleotide I saw this expression:
(x +# 8) -# 1
which would be relatively easy to optimise.
The difficulty is knowing where to stop. What about
(8 +# x) -# 1?
Anyway, this ticket is to record the issue. Currently constant folding is done by the built-in RULES in
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information