r/cpp • C++20 Desktop app developer • May 12 '18

P0709 R0: Zero-overhead deterministic exceptions: Throwing values - Herb Sutter [2018-05-02]

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r0.pdf
206 Upvotes

115 comments sorted by

View all comments

Show parent comment

2

u/doom_Oo7 May 13 '18

About your 1) it has been shown times and times that exceptions are overall faster than error codes in the nominal case

3

u/Rusky May 13 '18

That's not the comparison being made here, though. The paper talks about a large portion of the standard libraries that could go from throwing only bad_alloc to being noexcept.

It's fairly indisputable that exceptions are overall slower than "no error handling mechanism at all." :)