4 ms·
Bounds check out of the tight loop can give the possibility of the compiler dropping bounds check and/or related branches later.
by cmrdporcupine 3y ago
Bounds check out of the tight loop can give the possibility of the compiler dropping bounds check and/or related branches later.
- menaerus 3y agoThis sounds purely theoretical. And still even if compiler would be able to coalesce multiple branches into less, such branchy code still cannot be faster than the branchless one.