Improved Prims generator speed.