[Python-Dev] Caching float(0.0)
skip at pobox.com
skip at pobox.com
Tue Oct 3 03:25:12 CEST 2006
skip> Most definitely. I just posted what I came up with in about two
skip> minutes. I'll add some code to track the high water mark as well
skip> and report back.
Using the smallest change I could get away with, I came up with these
allocation figures (same as before):
-1.0: 29048
0.0: 524340
+1.0: 91560
rest: 1753479
whole numbers -10.0 to 10.0: 1151543
and these max ref counts:
-1.0: 16
0.0: 136
+1.0: 161
rest: 1
whole numbers -10.0 to 10.0: 161
When I have a couple more minutes I'll just implement a cache for whole
numbers between -10.0 and 10.0 and test that whole range of values right.
Skip
More information about the Python-Dev
mailing list