Array bound checks removal increasing importance
    "Nordlöw" via Digitalmars-d 
    digitalmars-d at puremagic.com
       
    Sat May 31 16:06:55 PDT 2014
    
    
  
> bound tests. This means that optimizing away bound checks is 
> becoming more and more important in D. And D can't ignore this
Expressions like
x[0 .. $/n]
and
x[$/n .. $]
are important in many divide and conquer (recursive) algorithms 
such as quick-sort and shall not need bounds check simply because
0 <= $/n <= $, when n >=1
I've looked around in DMD for a suitable place to add checks for 
this but haven't found the spot where range-check is injected. 
Help anyone?
    
    
More information about the Digitalmars-d
mailing list