Avoiding Slice Checking

"Nordlöw" via Digitalmars-d digitalmars-d at puremagic.com
Wed Jan 21 15:50:43 PST 2015


As a follow up to

https://github.com/D-Programming-Language/dmd/pull/4293

would it be possible to also avoid range-checking in expressions 
such as

     x[0 .. $/n]

and

     x[$/n .. $]

where n is an integer compile-time constant >= 2.

I'm askingbecause this is a reoccurring pattern in D-style binary 
divide-and-conquer algorithms and would be a good show-case for D 
from a performance standpoint.

Is DMD prepared for (easily) adding this to e2ir.c and 
expression.c?


More information about the Digitalmars-d mailing list