[issue1734234] Fast path for unicodedata.normalize()

"Martin v. Löwis" <report@bugs.python.org> at psf.upfronthosting.co.za "Martin v. Löwis" <report@bugs.python.org> at psf.upfronthosting.co.za
Sun Apr 26 07:05:01 CEST 2009


Martin v. Löwis <martin at v.loewis.de> added the comment:

The patch looks fine to me, please apply. One change is necessary: the
quick check should only be performed if it is the newest version (i.e.
self is NULL); otherwise, we would need to add a delta list for changed
quickcheck values, as well.

I think it would be possible to fold the NO and MAYBE answers into NO in
the database already, reducing the number of necessary bits to 4, and
then allowing to check with a simple bit test (i.e. no shift). OTOH, the
shift can be avoided already, by changing  quickcheck_shift into a
bitmask. OTTH, perhaps the compiler does that already, anyway.

With a reduction of the number of bits, it would be possible to reclaim
a byte, by merging the bits into one of the other fields. Whether that's
worth it, I don't know.

----------
assignee:  -> pitrou
resolution:  -> accepted

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


More information about the Python-bugs-list mailing list