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 Neil.Hodgson, ethan.furman, ezio.melotti, georg.brandl, pitrou, serhiy.storchaka, vstinner
Date 2013-04-08.10:24:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365416688.08.0.843890855363.issue17615@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-04-08 10:24:48serhiy.storchakasetrecipients: + serhiy.storchaka, georg.brandl, pitrou, vstinner, ezio.melotti, ethan.furman, Neil.Hodgson
2013-04-08 10:24:48serhiy.storchakasetmessageid: <1365416688.08.0.843890855363.issue17615@psf.upfronthosting.co.za>
2013-04-08 10:24:48serhiy.storchakalinkissue17615 messages
2013-04-08 10:24:47serhiy.storchakacreate