4 ms·
Interesting. In principle that idea does look better, but the data dependency on the loop condition could be the bottleneck. CPUs probably have plenty of pipeli
by steerablesafe 6y ago
Interesting. In principle that idea does look better, but the data dependency on the loop condition could be the bottleneck. CPUs probably have plenty of pipelining capacity to calculate `k*k` parallel to `n div k`, so effectively free as it's much faster than division.