assume, assert, enforce, @safe
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Thu Sep 18 06:49:22 PDT 2014
On Thu, 18 Sep 2014 08:57:20 -0400, Kagamin <spam at here.lot> wrote:
> On Tuesday, 16 September 2014 at 00:33:47 UTC, Steven Schveighoffer
> wrote:
>> The cost for this is tremendous. You may as well not use classes.
>
> Looks like ldc has a separate option to turn off invariants.
That's a good thing. I'm actually thinking this should be in DMD as well.
invariants, always called by default, when almost no object defines one,
is really costly. It's also a virtual call, which means any inlining is
not possible.
-Steve
More information about the Digitalmars-d
mailing list