A.M. Kuchling <li...@amk.ca> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7593>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to