[EMAIL PROTECTED] wrote:\/ > Steve> By these statistics I think the answer to the original question > Steve> is clearly "no" in the general case. > > As someone else (Guido?) pointed out, the literal case isn't all that > interesting. I modified floatobject.c to track a few interesting > floating point values: > [...code...] > > So for a largely non-floating point "application", a fair number of floats > are allocated, a bit over 25% of them are -1.0, 0.0 or +1.0, and nearly 50% > of them are whole numbers between -10.0 and 10.0, inclusive. > > Seems like it at least deserves a serious look. It would be nice to have > the numeric crowd contribute to this subject as well.
As a representative of the numeric crowd, I'll say that I've never noticed this to be a problem. I suspect that it's a non issue since we generally store our numbers in arrays, not big piles of Python floats, so there's no opportunity for identical floats to pile up. -tim _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com