Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
gsg
on Sept 24, 2020
|
parent
|
context
|
favorite
| on:
How expensive is integer-overflow trapping in C++?
That still exists though? add rax, rbx/jo overflow_error is how you do overflow checking on x86-64.
chrisseaton
on Sept 24, 2020
[–]
That doesn’t work with a lot of arithmetic, so you have to use slower arithmetic in order to use it.
gsg
on Sept 24, 2020
|
parent
[–]
Sure, but that didn't change much between x86 and x86-64. Perhaps it got a little worse because the SIMD instructions aren't overflow check friendly.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: