Faster inner loop