Martin v. Löwis added the comment:

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.

----------
nosy: +loewis

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

Reply via email to