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/2008-February/076773.html below:

[Python-Dev] int/float freelists vs pymalloc

[Python-Dev] int/float freelists vs pymalloc [Python-Dev] int/float freelists vs pymallocChristian Heimes lists at cheimes.de
Fri Feb 8 19:54:41 CET 2008
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



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