Efficiency improvements to lm composition