[Python-Dev] Re: [Python-checkins] python/dist/src/Misc NEWS, 1.936, 1.937

Michael Hudson mwh at python.net
Fri Feb 20 06:15:11 EST 2004

"M.-A. Lemburg" <mal at egenix.com> writes:

> mwh at users.sourceforge.net wrote:
>> Update of /cvsroot/python/python/dist/src/Misc
>> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3489/Misc
>> Modified Files:
>> 	NEWS Log Message:
>> "Fix" (for certain configurations of the planets, including
>> recent gcc on Linux/x86)
>> [ 899109 ] 1==float('nan')
>> by implementing rich comparisons for floats.  
> Have you benchmarked this change ?

No.  Hadn't even occurred to me.

A unscientific test suggests a slowdown of about 1 percent for '1.0 !=
2.0' and a speed up of about the same for '1.0 == 1.0'.

> Rich comparisons sound a lot like overhead and the case you
> are trying to fix here isn't exactly a common one.

Doesn't look like it makes much odds here.


  ... but I'd rather not reinvent the wheel if I don't have to.  On
  the other hand, if the currently instantiated version of the wheel
  consists of a square rock covered with moss, I might as well just
  start fresh.                          -- Roy Smith, comp.lang.python

More information about the Python-Dev mailing list