[issue13279] Add memcmp into unicode_compare for optimizing comparisons

2011-10-31 Thread Richard Saunders
Richard Saunders added the comment: Some more information: Bob Arendt and I have been playing with the Fedora Core .spec file for python on Fedora Core 15: the compile options we found seem to automatically (as we did non invoke this option) invoke '-fno-builtin-memcmp' so

[issue13279] Add memcmp into unicode_compare for optimizing comparisons

2011-10-31 Thread Richard Saunders
Richard Saunders added the comment: Added branches for specializing for UCS2 and UCS4 types -- Added file: http://bugs.python.org/file23574/unicode_with_memcmp_and_ucs_specialization.patch ___ Python tracker <http://bugs.python.org/issue13

[issue13279] Add memcmp into unicode_compare for optimizing comparisons

2011-10-31 Thread Richard Saunders
Richard Saunders added the comment: Here's a test demonstrating the memcmp optimization effect: --- more ~/PickTest5/Python/string_test3.py a = [] b = [] c = [] d = [] for x in range(0,1000) : a.append("the quick brown

[issue13279] Add memcmp into unicode_compare for optimizing comparisons

2011-10-27 Thread Richard Saunders
Richard Saunders added the comment: This is a potential patch: I believe it follows the C-style of PEP 7 There is a test as well, testing 1 and 2 byte kinds. I have run it through the python tests and have added no new breakages (there were some tests that failed, but they failed with and

[issue13279] Add memcmp into unicode_compare for optimizing compares

2011-10-27 Thread Richard Saunders
New submission from Richard Saunders : In discussions of memcmp performance, (http://www.picklingtools.com/study.pdf) it was noted how well Python 2.7 can take advantage of faster memcmps (indeed, the rich comparisons are all memcmp calls). There have been some discussion on python