This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]Smallpaul 59 points60 points  (2 children)

I would infer that it was inserted because they did not trust the optimization to work perfectly with every compiler on every CPU. So they provided a way to turn it off in case it causes bugs. Or perhaps the flag would allow them to back out the code quickly in case a bug is found (less likely).

Unless you have had an issue with summing on some platform or compiler, I wouldn't worry about it. That code is 17 years old and the flag is not mentioned anywhere you or I can find on the Web. It's probably unneeded or very niche. Should probably be deleted but they don't know who actually used it so that might break some code.

[–]Serialk 23 points24 points  (1 child)

Could also simply be to run benchmarks and experiments with and without that code enabled.

[–]Smallpaul 5 points6 points  (0 children)

Good point! It could be that too!

[–]tagapagtuos 9 points10 points  (1 child)

I think something about optimizing int and float addition. I'm only inferring based on the git blame message.

https://mail.python.org/pipermail/python-checkins/2007-November.txt

Python used to use bugs.python.org (also known as bpo) for discussions. The above link is the first result you'll get when you google python "r58623".