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 Neil.Hodgson
Recipients Neil.Hodgson, ethan.furman, ezio.melotti, georg.brandl, pitrou, python-dev, serhiy.storchaka, vstinner
Date 2013-04-08.23:32:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365463927.73.0.415275494068.issue17615@psf.upfronthosting.co.za>
In-reply-to
Content
Including the wmemcmp patch did not improve the times on MSC v.1600 32 bit - if anything, the performance was a little slower for the test I used:

a=['C:/Users/Neil/Documents/λ','C:/Users/Neil/Documents/η']156
specialised:
[0.9125948707773204, 0.8990815272107868, 0.9055365478250721]
wmemcmp:
[0.9287715478844594, 0.926606017373151, 0.9155132192031097]

Looking at the assembler, there is a real call to wmemcmp which adds some time and wmemcmp does not seem to be optimized compared to a simple loop.

However, the use of memcmp for 1:1 is a big win. Replacing the memcmp with COMPARE(Py_UCS1, Py_UCS1) shows memcmp is 45% faster on 100 character strings. memcmp doesn't generate a real call: instead there is an inline unrolled (4 bytes per iteration) loop.
History
Date User Action Args
2013-04-08 23:32:07Neil.Hodgsonsetrecipients: + Neil.Hodgson, georg.brandl, pitrou, vstinner, ezio.melotti, ethan.furman, python-dev, serhiy.storchaka
2013-04-08 23:32:07Neil.Hodgsonsetmessageid: <1365463927.73.0.415275494068.issue17615@psf.upfronthosting.co.za>
2013-04-08 23:32:07Neil.Hodgsonlinkissue17615 messages
2013-04-08 23:32:07Neil.Hodgsoncreate