Message99471
I finally got around to benchmarking this change, and unfortunately the results are not good.
I used the regex tests in the Unladen Swallow test suite, regex_effbot and regex_v8. The tests are written for Python 2.x, but the fixes for 3.x are straightforward (use print() in one function; replace xrange with range in the bm_regex_effbot.py and bm_regex_v8.py files; remove a few uses of u''; I'll provide a patch later.)
Hardware: MacBook, Intel Core 2 Duo, 1.83GHz, 2MB L2 cache, 667 MHz bus.
Tests invoked with ./perf.py -b regex_effbot -r -v ../py3k/python.exe ../threaded-3000/python.exe
regex_effbot is 1.1002 times slower with the computed-goto patch, and
regex_v8 is 1.0081x slower. perf.py indicates that both results are significant.
I'd like to see a few people replicate these results -- maybe the effect is very platform dependent or I ran the tests incorrectly -- but on current evidence, this patch is not worth pursuing. |
|
Date |
User |
Action |
Args |
2010-02-17 14:36:54 | akuchling | set | recipients:
+ akuchling, loewis, georg.brandl, pitrou, ezio.melotti |
2010-02-17 14:36:53 | akuchling | set | messageid: <1266417413.71.0.972191323045.issue7593@psf.upfronthosting.co.za> |
2010-02-17 14:36:51 | akuchling | link | issue7593 messages |
2010-02-17 14:36:50 | akuchling | create | |
|