D 50% slower than C++. What I'm doing wrong?

Jonathan M Davis jmdavisProg at gmx.com
Sat Apr 14 19:05:21 PDT 2012


On Sunday, April 15, 2012 03:51:59 ReneSac wrote:
> About compiler optimizations, -finline-functions and -fweb are
> part of -O3. I tried to compile with -no-bounds-check, but made
> no diference for DMD and GDC. It probably is part of -release as
> q66 said.

Not quite. -noboundscheck turns off _all_ array bounds checking, whereas -
release turns it off in @system and @trusted functions, but not in @safe 
functions. But unless you've marked your code with @safe or it uses templated 
functions which get inferred as @safe, all of your functions are going to be 
@system functions anyway, in which case, it makes no difference.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list