This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients mark.dickinson, skrah
Date 2011-09-15.18:24:36
SpamBayes Score 9.08201e-07
Marked as misclassified No
Message-id <20110915182136.GA12018@sleipnir.bytereef.org>
In-reply-to <1316085399.35.0.882775814031.issue12985@psf.upfronthosting.co.za>
Content
My rationale was something like this: If a compiler optimizes away signed
arithmetic overflow, this particular comparison will most likely be in
the set of optimizations, since it seems like low hanging fruit.

Of course it doesn't guarantee wrapping behavior in general.

> BTW, I suspect that the reason there were no related test failures
> with the Intel compiler is that most of the problems in the Python
> code stem from multiplications rather than additions.  Probably icc
> isn't sophisticated enough to optimize those multiplication + division
> checks away.

Yes, I think that's it.

> Seems like we should probably be looking for an icc flag that forces
> wrapping on signed integer overflow.

I didn't find any in the man page or search engines.

> In the long run, it would still be good to eliminate the need
> for fwrapv and the like;  it can have a significant performance hit.

I agree, but it's progressing quite slowly. ;)
History
Date User Action Args
2011-09-15 18:24:36skrahsetrecipients: + skrah, mark.dickinson
2011-09-15 18:24:36skrahlinkissue12985 messages
2011-09-15 18:24:36skrahcreate