[Python-Dev] Caching float(0.0)
Guido van Rossum
guido at python.org
Wed Oct 4 06:06:54 CEST 2006
On 10/3/06, Steve Holden <steve at holdenweb.com> wrote:
> If the brainpower already expended on this issue were proportional to
> its significance then we'd be reading about it on CNN news.
>
> This thread has disappeared down a rat-hole, never to re-emerge with
> anything of significant benefit to users. C'mon, guys, implement a patch
> or leave it alone :-)
Hear, hear.
My proposal: only cache positive 0.0. My prediction: biggest bang for
the buck, nobody's code will break. On platforms that don't
distinguish between +/- 0.0, of course this would cache all zeros. On
platforms that do distinguish them, -0.0 is left alone, which is just
fine.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list