Speedup for znprimroot