Constant Folding
Constant folding is performing operations on constants at compile time:
(/ (* angle 3.1415926) 180.0) (sqrt 2.0)
The savings from doing this on programmer expressions is minor. However, there can be savings by optimizing the results of program manipulations.
Constant folding must be used with care: operators that have side effects should not be folded.
>(println "foo") foo nilWe do not want to replace this print with nil.