On Thu, Aug 25, 2011 at 1:24 AM, "Martin v. Löwis" <mar...@v.loewis.de> wrote: >> With this PEP, the unicode object overhead grows to 10 pointer-sized >> words (including PyObject_HEAD), that's 80 bytes on a 64-bit machine. >> Does it have any adverse effects? > > If I count correctly, it's only three *additional* words (compared to > 3.2): four new ones, minus one that is removed. In addition, it drops > a memory block. Assuming a malloc overhead of two pointers per malloc > block, we get one additional pointer. [...]
But strings are allocated via PyObject_Malloc(), i.e. the custom arena-based allocator -- isn't its overhead (for small objects) less than 2 pointers per block? -- --Guido van Rossum (python.org/~guido) _______________________________________________ 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