Message202273
| Author |
vstinner |
| Recipients |
vstinner |
| Date |
2013年11月06日.17:05:05 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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(). |
|
History
|
|---|
| 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 |
|