Re: eliminating array bounds checking overhead

"Randall Hyde" <rhyde@shoe-size.com>
27 Apr 2000 10:47:14 -0400

          From comp.compilers

Related articles
eliminating array bounds checking overhead mayur_naik@my-deja.com (2000-04-26)
Re: eliminating array bounds checking overhead stephan@pcrm.win.tue.nl (2000-04-27)
Re: eliminating array bounds checking overhead vugluskr@unicorn.math.spbu.ru (2000-04-27)
Re: eliminating array bounds checking overhead jprice@scdt.intel.com (2000-04-27)
Re: eliminating array bounds checking overhead blaak@infomatch.com (Ray Blaak) (2000-04-27)
Re: eliminating array bounds checking overhead Sid-Ahmed-Ali.TOUATI@inria.fr (Sid Ahmed Ali TOUATI) (2000-04-27)
Re: eliminating array bounds checking overhead rhyde@shoe-size.com (Randall Hyde) (2000-04-27)
Re: eliminating array bounds checking overhead nr@labrador.eecs.harvard.edu (2000-04-27)
Re: eliminating array bounds checking overhead terryg@uswest.net (Terry Greyzck) (2000-04-27)
Re: eliminating array bounds checking overhead fjscipio@rochester.rr.com (Fred J. Scipione) (2000-04-27)
Re: eliminating array bounds checking overhead sandeep@ddi.com (Sandeep Dutta) (2000-04-29)
Re: eliminating array bounds checking overhead tej@melbpc.org.au (Tim Josling) (2000-04-30)
Re: eliminating array bounds checking overhead markw65@my-deja.com (Mark Williams) (2000-04-30)
[10 later articles]
| List of all articles for this month |

From: "Randall Hyde" <rhyde@shoe-size.com>
Newsgroups: comp.compilers
Date: 27 Apr 2000 10:47:14 -0400
Organization: Compilers Central
References: 00-04-194
Keywords: optimize



<mayur_naik@my-deja.com> wrote in message news:00-04-194@comp.compilers...
> Hello
>
> I wish to perform an array lookup of the form:
>
snipped...
> Does any language or any machine
> provide some mechanism to:
>
> 1. index an array without checking its bounds
> 2. throw an exception if the index was actually out of range
> 3. allow the programmer to catch and handle the exception rather than
> terminate the program


If the language did this, it would simply be implementing those
comparisons behind your back. I'm assuming you don't want this.


OTOH, most modern CPUs support memory management which provides the
hardware to achieve exactly what you're looking for. As for letting
the programmer handle this; well, that turns out to be an operating
system feature (unless you're working on the bare metal yourself).


Randy Hyde
[The CPUs I know of only provide page level memory management. x86
CPUs still have segments but nobody uses them because they're slow and
it's hard to generate code for them. -John]











Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.