[pypy-dev] Unicode encode/decode speed

Maciej Fijalkowski fijall at gmail.com
Tue Feb 12 10:04:59 CET 2013


On Tue, Feb 12, 2013 at 1:24 AM, Elefterios Stamatogiannakis
<estama at gmail.com> wrote:
> On 11/2/2013 7:39 μμ, Amaury Forgeot d'Arc wrote:
>>
>> 2013/2/11 Eleytherios Stamatogiannakis <estama at gmail.com
>> <mailto:estama at gmail.com>>
>>
>>
>>      >
>>      > Which kind of profiler are you using? It possible that CPython
>>     builtin
>>      > functions are not profiled the same way as PyPy's.
>>
>>     lsprofcalltree.py .
>>
>>      From APSW's source code, i think that it uses this API:
>>
>>     (in cursor.c)
>>     PyUnicode_DecodeUTF8
>>
>>     Maybe lsprofcalltree doesn't profile it?
>>
>>
>> Indeed. CPU cost is hidden in the cursor method.
>
>
> Thanks Amaury for looking into this,
>
> Assuming that PyPy's "codecs.utf_8_decode" is slower when used with CFFI
> than using PyUnicode_DecodeUTF8 in CPython.
>
> Is there anything that can be done in CFFI that would have the same
> performance as PyUnicode_DecodeUTF8 (and the same for encode)?
>


Hi

I would like to see some evidence about it. Did you try valgrind?

Cheers,
fijal


More information about the pypy-dev mailing list