On Thursday, 30 November 2017 at 18:18:41 UTC, Jonathan M Davis
wrote:
But I have a hard time believing that the cost of assertions
relates to constructing an AssertError unless the compiler is
inlining a bunch of stuff at the assertion site. If that's
what's happening, then it would increase the code size around
assertions and potentially affect performance.
- Jonathan M Davis
Indeed, if DMD is not marking the conditional call to _d_assert
(or whatever it is) 'cold' and the call itself `pragma(inline,
false)` then it needs to be changed to do so.