[issue14923] Even faster UTF-8 decoding

Serhiy Storchaka report at bugs.python.org
Sat May 26 11:52:10 CEST 2012


Serhiy Storchaka <storchaka at gmail.com> added the comment:

> It seems the patch relies on a two's complement representation of integers. Mark, do you think that's ok?

Yes, the patch depends on two facts -- 8-bit bytes and a two's
complement representation of integers. That's why I call it a trick.
However, today CPython will not work on other platforms. However, we can
wrap macro definition in #if/#else/#end and provide the traditional form
(but I don't remember how to test a two's complement representation in
compile time).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14923>
_______________________________________


More information about the Python-bugs-list mailing list