Boost logo

Boost :

Subject: Re: [boost] Noexcept
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2017-06-15 19:35:47


On 14/06/2017 23:01, Emil Dotchevski via Boost wrote:

> The supposed "unpredictability" of exceptions is not semantic but
> syntactic. Depending on the compiler, and depending on whether a function
> got inlined or not (even functions that are exception-neutral, e.g. neither
> throw nor catch exceptions), there might be overhead which sometimes may be
> significant, not to mention I have never seen a compiler that optimizes out
> throw statements.
>
> But even this is probably just theoretical. I've been asking for hard data
> that shows that in a given use case exception handling adds too much
> overhead. I keep hearing that such cases exist (and they probably do) but
> I'm yet to see a single one.

I don't think there is a lot of overhead, although there is. The C++
performance report mentions them:

http://www.open-std.org/jtc1/sc22/wg21/docs/TR18015.pdf

Then you have random posts about the issue, but I don't think there is a
serious analysis:

http://www.gamearchitect.net/Articles/ExceptionsAndErrorCodes.html

Ion


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk