[Python-Dev] Caching float(0.0)

skip at pobox.com skip at pobox.com
Tue Oct 3 13:21:08 CEST 2006


    >> The total count of floating point numbers allocated at this point is
    >> 985794.  Without the reuse, they would be 1317145, so this is a
    >> saving of 25%, and of 5Mb.

    Nick> And, if you optimised just 0.0, you would get 60% of that saving
    Nick> at a small fraction of the cost and considerably greater
    Nick> generality.  It isn't clear whether the effort justifies doing
    Nick> more.

Doesn't that presume that optimizing just 0.0 could be done easily?  Suppose
0.0 is generated all over the place in EVE?

Skip


More information about the Python-Dev mailing list