[Python-Dev] Caching float(0.0)
"Martin v. Löwis"
martin at v.loewis.de
Mon Oct 2 15:43:48 CEST 2006
Nick Coghlan schrieb:
>> Right. Although I do wonder what kind of software people write to run
>> into this problem. As Guido points out, the numbers must be the result
>> from some computation, or created by an extension module by different
>> means. If people have many *simultaneous* copies of 0.0, I would expect
>> there is something else really wrong with the data structures or
>> algorithms they use.
> I suspect the problem would typically stem from floating point values
> that are read in from a human-readable file rather than being the result
> of a 'calculation' as such:
That's how you can end up with 100 different copies of 0.0. But
apparently, people are creating millions of them, and keep them in
memory simultaneously. Unless the text file *only* consists of floating
point numbers, I would expect they have bigger problems than that.
More information about the Python-Dev