John Regehr on "Use of Assertions"
Trass3r
un at known.com
Fri Sep 7 22:20:34 UTC 2018
On Wednesday, 5 September 2018 at 19:35:46 UTC, Meta wrote:
> I think the only sane way to use asserts as an optimization
> guide is when the program will abort if the condition does not
> hold.
Which is the usual behavior of assert.
I'm all for using them to optimize but it's not clear how to do
that. You can't just blindly turn it into assume since that may
actually impede optimizations:
https://llvm.org/docs/LangRef.html#llvm-assume-intrinsic
More information about the Digitalmars-d
mailing list