I ran these tests using Python 2.2.1 on a 433MHz PII Celeron under FreeBSD 4.9.
Hmm. I assume that the methods discussed in the link are should still be valid for Python 3.x? I ran these tests using Python 2.2.1 on a 433MHz PII Celeron under FreeBSD 4.9.
Hmm. I assume that the methods discussed in the link are should still be valid for Python 3.x?You also need to keep in mind that strings in Python 3 are Unicode-only, so much of the processing will be different. The equivalent to a Python 2.x string is called 'bytes'. It would be interesting to use this to compare string vs bytes performance under Py3k.
The one test which definitely will not work out-of-the-box is #3, for the reason above. "Character" arrays are now referred to as "byte" arrays, and you'll have to change array('c') to array('b') to get the original 8-bit behaviour, or to array('u') to use Unicode characters.