This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients benjamin.peterson, pitrou, python-dev, serhiy.storchaka, skrah, vstinner
Date 2012-04-05.21:24:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333661201.19688.41.camel@raxxla>
In-reply-to <1333659631.69.0.600369800185.issue14249@psf.upfronthosting.co.za>
Content
> 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.
History
Date User Action Args
2012-04-05 21:24:26serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner, benjamin.peterson, skrah, python-dev
2012-04-05 21:24:25serhiy.storchakalinkissue14249 messages
2012-04-05 21:24:25serhiy.storchakacreate