4 ms·
So is Swift effectively adding a jo / jump on overflow instruction after each normal integer operation?
by zeotroph 6y ago
So is Swift effectively adding a jo / jump on overflow instruction after each normal integer operation?
- saeta 6y ago`+` is checked for overflow by default (can be overridden with compiler flags), and `&+` is overflowing addition and does auto-vectorize equivalently to C++. I'd be quite interested in seeing a benchmark comparing checked and unchecked addition that doesn't get auto-vectorized to understand the performance in practice for non-numerical computing.