I don't know if this is too late to do before the final release, but shouldn't the implementation of PyUnicodeObject be updated to match the much more efficient old PyStringObject layout? I mean eliminating the double malloc that is currently required for each unicode string.
PyStringObject is declared as a PyVarObject allocated in one chunk, whereas the current PyUnicodeObject is a PyObject allocated in two chunks, one for the object and one for the Py_UNICODE data. I think that this change would go a long way towads making unicode strings comparable to old (2.x) string speeds. I can see that if not changed now, there would be 3rd party extensions that would be relying on the particular layout of PyUnicodeObject and therefore making changing it later too risky. If there is interest in this change, I would happily write a patch that make this change. Thanks, Jeremy -- Jeremy Kloth http://4suite.org/ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com