Struct default constructor - need some kind of solution for C++ interop
Ethan Watson via Digitalmars-d
digitalmars-d at puremagic.com
Thu Sep 8 04:26:22 PDT 2016
On Thursday, 8 September 2016 at 11:18:12 UTC, Walter Bright
wrote:
> The thing is, the 'destroy()' function is going to swamp any
> extra clock cycle, as will a virtual lookup and dereference.
Assume destroy() is a more trivial function then. The point is
that if you put more than two branches in a 64-byte cacheline on
that processor, things get significantly slower and the loop
iteration itself becomes a hotspot.
Being D though. Destructors can be contracted, yeah? Because the
way we operate is that we compile out all those validation checks
for a retail release and assume everything works. Checking for
the validity of the pointer in an in block would be perfect for
that.
More information about the Digitalmars-d
mailing list