A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-September/069074.html below:

[Python-Dev] Caching float(0.0)

[Python-Dev] Caching float(0.0) [Python-Dev] Caching float(0.0)Bob Ippolito bob at redivi.com
Sat Sep 30 03:15:15 CEST 2006
On 9/29/06, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Nick Craig-Wood wrote:
>
> > Is there any reason why float() shouldn't cache the value of 0.0 since
> > it is by far and away the most common value?
>
> 1.0 might be another candidate for cacheing.
>
> Although the fact that nobody has complained about this
> before suggests that it might not be a frequent enough
> problem to be worth the effort.

My guess is that people do have this problem, they just don't know
where that memory has gone. I know I don't count objects unless I have
a process that's leaking memory or it grows so big that I notice (by
swapping or chance).

That said, I've never noticed this particular issue.. but I deal with
mostly strings. I have had issues with the allocator a few times that
I had to work around, but not this sort of issue.

-bob
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4