Does D use zero-cost exceptions?
Araq
rumpf_a at web.de
Tue Apr 16 15:24:41 UTC 2019
On Monday, 15 April 2019 at 20:24:27 UTC, Andrei Alexandrescu
wrote:
>
> Sadly that's not quite the case... we've run a bunch of test at
> Facebook back in the day and the sheer presence of unwinding
> disables a bunch of optimizations, notably code motion and
> everything enabled by it. The bottom line effect is quite
> unpleasant, in the single digits.
>
> This is a problem important enough for C++ that they added a
> keyword dedicated to it (noexcept).
Did you compare it to if-based error handling or to calling
terminate/abort on error? I would expect that excessive if
statements for error handling prevent the code motion
optimizations in the same way.
More information about the Digitalmars-d
mailing list