For Programmers: Free Programming Magazines  


Home > Archive > Fortran > May 2006 > Re: Bounds Check Overhead









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Bounds Check Overhead
robin

2006-05-27, 7:02 pm

"Simon Wright" <simon@pushface.org> wrote in message
news:m2mzd569l9.fsf@grendel.local...
> Bob Lidral <l1dralspamba1t@comcast.net> writes:
>
>
> In Ada one should where possible use the 'Range attribute:


Ideally yes, but in practice, such as in sorting and averaging,
the loop is often one or two short of the number of elements in the array.

> for I in Some_Array'Range loop
> Process (Some_Array (I));
> end loop;
>
> where I _can't_ exceeed the bounds, so it would be surprising if a
> compiler inserted bounds checks.



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com