multiplies by powers of two

Matthew Fluet mfluet@intertrust.com
Wed, 11 Jul 2001 16:34:16 -0700 (PDT)


> > I claim that changing the basis library to use non-overflow-detection ops is
> > bad.  It will, of course, speed things up, but the code should be written to
> > be readable and the compiler should be figuring this out.
>
> Too much of it is too hard.  Someday we will get some of it, but I think it is
> the right balance for now to let a user run with -detect-overflow true on their
> code but -detect-overflow false on the basis library code, which is presumably
> much more thoroughly tested.

I guess it depends what Steve is rewriting.  I doubt you mean
"-detect-overflow false on the basis library code" means that that all
integer ops used in the basis library become non-detecting.  But, I guess
I could see that rewriting the Array.* functions to use non-detecting +1's
for the loops would be o.k., since the length must be < Int.maxInt.