Serhiy Storchaka added the comment:

You can use a single switch instead nested switches:

switch ((kind1 << 3) + kind2) {
case (PyUnicode_1BYTE_KIND << 3) + PyUnicode_1BYTE_KIND: {
    int cmp = memcmp(data1, data2, len);
    ...
}
case (PyUnicode_1BYTE_KIND << 3) + PyUnicode_2BYTE_KIND:
    COMPARE(Py_UCS1, Py_UCS2);
    break;
...
}

I don't know if there is any effect.

----------
components: +Interpreter Core
stage: needs patch -> patch review

_______________________________________
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