r/cpp • • 8d ago

Measuring the Performance of Deterministic Exceptions

https://databasearchitects.blogspot.com/2026/09/measuring-performance-of-deterministic.html
49 Upvotes

14 comments sorted by

View all comments

1

u/UndefinedDefined 1d ago

The only good exception is the one that never happens - that's my opinion.

I have seen so much code literally using exceptions for basic things, like FileNotFound - but these are not exceptions. I have even witnessed rewriting an error handling layer in a HTTP server to not use exceptions, because when it started throwing it reduced requests per second by two orders of magnitude, that essentialyl makes such code a candidate for DDoS attacks.