Integer Overflow

Gerardo Richarte core.lists.python at core-sdi.com
Wed Nov 28 11:29:32 EST 2001


Bjorn Pettersen wrote:

> > From: Hans Nowak [mailto:wurmy at earthlink.net]
> >
> > Ursus Horibilis wrote:
> > >
> > > Is there a way to force the Python run time system to ignore integer
> > > overflows?  I was trying to write a 32-bit Linear
> > Use longs:

    What about performance when using Longs? is it as fast as using standard numbers?
    I wanted to disable Integer Overflow exceptions last week, and finally started using Longs,
with something like (A + B) & 0xffffffff
    i.e. I had to force the integer overflow condition using Longs (I was implementing a
blowfish cipher for a ssh client) and I think it does have a hit on performance.

    Performer Bye!
    richie


--- for a personal reply use: Gerardo Richarte <gera at corest.com>




More information about the Python-list mailing list