News for hackers. Stuff that matters.
Re:Current hardware trends make C++ exceptions harder to jus... by masklinn on Tuesday February 22, 2022 @01:44PM (#30431780)
> Very interesting that exceptions have much less overhead on the happy path than Rust/Haskell style Either types

C++ genuinely traded “error” cases (made them even costlier) so that the happy path of exceptions would be cheaper. I don’t remember whether that’s the case in C++, but in some language/implementations (used to be a big issue in V8) just having a try/except would drastically deoptimise a function, even if the exception never happened.

There are no comments on this comment yet.