Antoine Pitrou 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);
> ...
> }
Please let's not add this kind of optifuscation unless it has a large positive
effect.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17615>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com