Message202273
In interactive mode, when I run python in gdb, I see that PyUnicode_DecodeUTF8Stateful() is called a lot of times. Calls come from PyDict_GetItemString() or PySys_GetObject() for example.
Allocating a temporary Unicode string and decode a byte string from UTF-8 is inefficient: the memory allocator is stressed and the byte string is decoded at each call.
I propose to reuse the _Py_IDENTIFIER API in most common places to limit calls to the memory allocator and to PyUnicode_DecodeUTF8Stateful(). |
|
Date |
User |
Action |
Args |
2013-11-06 17:05:05 | vstinner | set | recipients:
+ vstinner |
2013-11-06 17:05:05 | vstinner | set | messageid: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> |
2013-11-06 17:05:05 | vstinner | link | issue19512 messages |
2013-11-06 17:05:05 | vstinner | create | |
|