[Tim] > WRT RAM usage, a Python int is no smaller than a TimeStamp object. [Guido[ > Wrong, unless TimeStamps also use a custom allocator. Good point, and it doesn't (it uses PyObject_NEW). I don't think counting fractions of bytes is of great interest here, though, since I (still) believe it's the massive Zope DateTime type that's the focus of complaints. > The custom allocator uses 12 bytes per int (on a 32-bit machine) and > incurs malloc overhead + 8 bytes of additional overhead for every 82 ints. > That's about 12.2 bytes per int object; using malloc it would probably > be 24 bytes. (PyMalloc would probably do a little better, except it > would still round up to 16 bytes.) pymalloc overhead is a few percent; would work out to 16+f bytes per int object, for some f < 1.0. A difference is that "total memory dedicated to ints" never shrinks using the custom allocator, but can get reused for other objects under pymalloc.
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