4 ms·
I would argue for the last example it is better to write split the loop into four. I believe the intention is even clearer (because you are doing four different
by kccqzy 10y ago
I would argue for the last example it is better to write split the loop into four. I believe the intention is even clearer (because you are doing four different things), and that it is also faster even when optimizations are off due to better cache behavior. It may also make a smart but not "sufficiently smart" compiler to transform two of the loops into simple memset.