Warnings killing my performance

Terry Reedy tjreedy at udel.edu
Sat Feb 7 02:46:03 CET 2004


"Kylotan" <kylotan at hotmail.com> wrote in message
news:153fa67.0402060933.13840e8c at posting.google.com...
> And my second is, is there a quick way of taking an integer, shifting
> it left 13 bits (or multiplying by 2 ** 13, whatever), discarding any
> excess bits, and which won't cause a warning?

Have you tried masking off the upper 13 bits *before* the shift?  So that
there is no overflow to warn about?  Does this make any sense?

TJR







More information about the Python-list mailing list