Aggressive conditional inlining with ldc only, not dmd

Nordlöw per.nordlow at gmail.com
Mon Mar 26 18:47:17 UTC 2018


On Monday, 26 March 2018 at 16:02:30 UTC, Rene Zwanenburg wrote:
> On Sunday, 25 March 2018 at 22:09:43 UTC, Nordlöw wrote:
>> eventhough I compile with -release -inline -nobounds flags.
>
> Just to make sure: are you passing -O as well?

Yes I am, thanks, via the dub spec

buildType "release-nobounds" {
           dflags "-mcpu=native" "-O3"
           buildOptions "releaseMode" "optimize" "noBoundsCheck" 
"inline"
}

I didn't measure any significant difference between -O and -O3.

Is each optimization level `x` in `-Ox` defined in the same way 
for clang and ldc? If so, where's the best documentation for it?


More information about the Digitalmars-d-learn mailing list