Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ilyt
on Dec 22, 2022
|
parent
|
context
|
favorite
| on:
Avoid exception throwing in performance-sensitive ...
>Unfortunately, I often see solutions abusing exceptions:
int sum = 0; for (int x : a) { try { sum += get_positive_value(x); } catch (...) { sum += -x; } }
you need to fire whoever does that...
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: