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 vstinner
Recipients Neil.Hodgson, ethan.furman, ezio.melotti, georg.brandl, pitrou, python-dev, serhiy.storchaka, vstinner
Date 2013-04-08.21:16:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365455805.95.0.579588638423.issue17615@psf.upfronthosting.co.za>
In-reply-to
Content
Neil.Hodgson wrote:
"The patch fixes the performance regression on Windows. The 1:1 case is better than either 3.2.4 or 3.3.1 downloads from python.org. Other cases are close to 3.2.4, losing at most around 2%."

Nice, but make sure that your are using the same compiler with the same options (ex: make sure that you are compiling in Release mode).

Neil.Hodgson wrote:
"Perhaps taking a systematic approach to naming would allow Py_UCS1 to be deduced from PyUnicode_1BYTE_KIND and so avoid repeating the information in the case selector and macro invocation."

I don't know how to do that in C. Anyway, I prefer to have a more explicit call to a "simple" macro than magic implicit arguments. Optimizations sometimes make the code harder to read (a good example: the whole PEP 393)...

--

I wrote specialized functions to compare strings for each combination of Unicode kinds, and I added a fast path using wmemcmp() when possible. I don't see other speedup.

On Linux, Comparing astral strings in Python 3.4 is now 3 times faster than Python 3.2 and 3.3. I achieved my goal, I can close the issue :-D
History
Date User Action Args
2013-04-08 21:16:46vstinnersetrecipients: + vstinner, georg.brandl, pitrou, ezio.melotti, ethan.furman, python-dev, serhiy.storchaka, Neil.Hodgson
2013-04-08 21:16:45vstinnersetmessageid: <1365455805.95.0.579588638423.issue17615@psf.upfronthosting.co.za>
2013-04-08 21:16:45vstinnerlinkissue17615 messages
2013-04-08 21:16:45vstinnercreate