Need for speed

Steven Schveighoffer schveiguy at gmail.com
Thu Apr 1 19:36:17 UTC 2021


On 4/1/21 3:27 PM, ag0aep6g wrote:
> On 01.04.21 21:00, Berni44 wrote:
>> ```
>> ldc2 -O3 -release -boundscheck=off -flto=full 
>> -defaultlib=phobos2-ldc-lto,druntime-ldc-lto speed.d
>> ```
> 
> Please don't recommend `-boundscheck=off` to newbies. It's not just an 
> optimization. It breaks @safe. If you want to do welding without eye 
> protection, that's on you. But please don't recommend it to the new guy.

Yes, but you can recommend `-boundscheck=safeonly`, which leaves it on 
for @safe code.

though I personally leave it on for everything.

-Steve


More information about the Digitalmars-d-learn mailing list