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 loewis
Recipients Neil.Hodgson, ethan.furman, ezio.melotti, georg.brandl, loewis, pitrou, python-dev, serhiy.storchaka, vstinner
Date 2013-04-09.22:20:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365546046.84.0.938959116798.issue17615@psf.upfronthosting.co.za>
In-reply-to
Content
I'd like to propose a code size reduction. If kind1 < kind2, swap(kind1, kind2) and swap(data1, data2). Set a variable swapped to 1 (not swapped) or -1 (swapped); then return either swapped or -swapped when a difference is found.

With that, the actual comparison could be sure that kind2 <= kind1, so if kind1 is UCS1, the inner switch can go away. If kind1 is UCS2, kind1 could only be UCS1 or UCS2.
History
Date User Action Args
2013-04-09 22:20:46loewissetrecipients: + loewis, georg.brandl, pitrou, vstinner, ezio.melotti, ethan.furman, python-dev, serhiy.storchaka, Neil.Hodgson
2013-04-09 22:20:46loewissetmessageid: <1365546046.84.0.938959116798.issue17615@psf.upfronthosting.co.za>
2013-04-09 22:20:46loewislinkissue17615 messages
2013-04-09 22:20:46loewiscreate