speed improvements in lmsamlu