3 ms·
As always, benchmark and profile! However, from first principles, this is one of the degenerate cases of certain JITs that often catches people off guard, but h
by vore 5y ago
As always, benchmark and profile! However, from first principles, this is one of the degenerate cases of certain JITs that often catches people off guard, but has a straightforward transformation to avoid the pessimizing behavior – especially if your loops end up looking like they're particularly hot.