Big speedup in eliminating double traverse