Faster tree iteration