Does D use zero-cost exceptions?
Radu
void at null.pt
Tue Apr 16 06:09:00 UTC 2019
On Monday, 15 April 2019 at 19:25:24 UTC, A wrote:
> It is well known that exceptions are much slower than their
> alternatives, but is there a performance cost for using
> try/catch, even when no Exception/Error is being thrown?
You can check this by looking at the generated assembly.
I tried this https://godbolt.org/z/fl8qlv and looks that for
non-exception path there is no cost associated with it, at least
for LDC.
More information about the Digitalmars-d
mailing list