[M3devel] integer overflow

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Tue Jan 12 22:17:00 CET 2010


On Tue, Jan 12, 2010 at 08:51:46PM +0000, Jay K wrote:
> 
> > subranges allow suppressing array index checks
>  
> I didn't know that.
> Sounds reasonable.
> I haven't contradicted it, have I?

No.  Assignments to subrange variables can be a lot less frequent than 
the use of those variables as subscripts, especially in, say, 
matrix-handling code.

>  
>  
> That does point out that indexing an array with an INTEGER need bounds checks on both ends though.
> Probably a FOR loop can optimize though -- no need to check the lower bound more than once or somesuch.

Might not have to check the lower bound at all.
Might only have to check the upper bound when you have to anyway in the 
loop control.

-- hendrik



More information about the M3devel mailing list