There is a pretty involved discussion about this topic here: Constant propagation vs generated functions