Message info
 
To:python-bugs-list@python.org From:Serhiy Storchaka Subject:[issue14249] unicodeobject.c: aliasing warnings Date:Thu, 05 Apr 2012 21:24:26 +0000
 


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

> I just replaced expressions in calls to Py_MAX by variables: Py_MAX is a macro and it may have to compute each expression twice.

gcc computes those values only once. It even caches them for use in
PyUnicode_WRITE. But other compilers may not be so smart.

Instead of Py_MAX(a,b) here you can use a|b. In theory this should be
more efficient, but I couldn't see the difference even with microscope.

However, all this does not matter, soon I will submit complex patch,
which speeds up the utf-16 decoder in 2-5 times.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14249>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40all-mail-archive.com