![](https://secure.gravatar.com/avatar/713ff48a0efeccf34727d8938993c30a.jpg?s=120&d=mm&r=g)
8 Feb
2008
8 Feb
'08
6:54 p.m.
Andrew MacIntyre wrote:
However, my tests do show that something is funny with the current freelist implementation for floats on at least 2 platforms, and that doing without that sort of optimisation for float objects would likely not be a hardship with PyMalloc.
float objects are slightly larger than int objects. On a 32bit OS both have ob_type pointer of size 4, a ref counter of size 4. But an int object has a value of type long with 4 bytes and a float stores its value in a double with size 8. I assume that the difference in size leads to a different allocation timing. Christian