[Shootout-list] Integer overflow

Peter Hinely phinely@hawaii.edu
Wed, 22 Sep 2004 15:42:20 -1000 (HST)


Hi,

>
> > We can't spare people an understanding of safety concerns by adding up
> > some number about them.  There's no benchmark you can run about safety.
>

I proposed adding some extra columns with flags showing different aspects
of safety of a particular entry.  I didn't propose any "safety"
benchmarks.

I actually would like to be able to submit 1 entry with bounds-checking on
and 1 entry with bounds-checking off.  I also think it would be very
interesting to see some of the entries from other languages ran with
safety disabled/enabled to see the difference in performance between the
two modes.

>
> My point is that integer overflow isn't necessarily a safety issue.
>
> I don't need a 2GB addressing range for my arrays, usually.
>

You are acessing your array with an int index or the equivalent, right?
Then it is a safety issue because you are *assuming* that the array index
has not overflowed.

Regards,
Peter