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 pitrou
Recipients lemburg, orivej, pitrou
Date 2008-01-30.15:56:22
SpamBayes Score 0.00374716
Marked as misclassified No
Message-id <1201708590.52.0.31377885644.issue1943@psf.upfronthosting.co.za>
In-reply-to
Content
After some more tests I must qualify what I said. The freelist patch is
an improvement in some situations. In others it does not really have any
impact. On the other hand, the PyVarObject version handles memory-bound
cases dramatically better, see below.

With a small string:
./python -m timeit -s "s=open('INTBENCH', 'r').read()" "s.split()"
-> Unpatched py3k: 26.4 usec per loop
-> Freelist patch: 21.5 usec per loop
-> PyVarObject patch: 20.2 usec per loop

With a medium-sized string:
./python -m timeit -s "s=open('LICENSE', 'r').read()" "s.split()"
-> Unpatched py3k: 458 usec per loop
-> Freelist patch: 408 usec per loop
-> PyVarObject patch: 316 usec per loop

With a long string:
./python -m timeit -s "s=open('Misc/HISTORY', 'r').read()" "s.split()"
-> Unpatched py3k: 31.3 msec per loop
-> Freelist patch: 32.7 msec per loop
-> PyVarObject patch: 17.8 msec per loop

(the numbers are better than in my previous posts because the
split-accelerating patch has been integrated)

Also, given those results, it is also clear that neither pybench nor
stringbench really stress memory efficiency of strings, only processing
algorithms.

That said, the freelist patch is attached.
History
Date User Action Args
2008-01-30 15:56:30pitrousetspambayes_score: 0.00374716 -> 0.00374716
recipients: + pitrou, lemburg, orivej
2008-01-30 15:56:30pitrousetspambayes_score: 0.00374716 -> 0.00374716
messageid: <1201708590.52.0.31377885644.issue1943@psf.upfronthosting.co.za>
2008-01-30 15:56:24pitroulinkissue1943 messages
2008-01-30 15:56:23pitroucreate