Array fill performance differences between for, foreach, slice

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Wed Apr 1 15:04:44 UTC 2020


On Wednesday, 1 April 2020 at 12:22:48 UTC, Adam D. Ruppe wrote:
> On Wednesday, 1 April 2020 at 06:48:09 UTC, Jacob Carlborg 
> wrote:
>> You have not enabled optimizations. You should compile with 
>> `-O -release -inline` to enable all optimizations.
>
> -release should *never* be used. You're trading memory safety 
> and security holes for a few microseconds of execution time. 
> Not worth the risk.
>

It is nice that bounds checks remain in place when using release 
and the code is @safe.


More information about the Digitalmars-d-learn mailing list