Common Subexpressions

Often multiple generate or replace statements will have common subexpressions. For example: generate y = a if c==d&e==f generate x = b if c==d&e==f

c==d&e==f is a "common subexpression". If it is precalculated:

generate smpl = c==d&e==f generate y = a if smpl generate x = b if smpl

the assignment statements will run in half the time. Especially because generate and replace spend a significant amount of time in single-threaded mode, the time in such statements can be significant. If the common subexpression can be given a meaningful name, this also enhances the readability of the program.