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 schmir
Recipients effbot, facundobatista, joshhoyt, loewis, schmir
Date 2008-01-04.18:48:21
SpamBayes Score 0.021784041
Marked as misclassified No
Message-id <1199472502.25.0.997529625316.issue846388@psf.upfronthosting.co.za>
In-reply-to
Content
./python Lib/timeit.py -n 1000000 -s "import
re;r=re.compile('a?a?a?a?a?aaaaa')" "r.match('aaaaa')" gives me for

Trunk:
1000000 loops, best of 3: 3.02 usec per loop
1000000 loops, best of 3: 2.99 usec per loop
1000000 loops, best of 3: 3.01 usec per loop

Patched:
1000000 loops, best of 3: 3.04 usec per loop
1000000 loops, best of 3: 3.04 usec per loop
1000000 loops, best of 3: 3.14 usec per loop

which would be ok, I guess.

(This is on a 64bit debian testing with gcc 4.2.3).

Can you test with the following:

if ((0 == (sigcount & 0xffffffff)) && PyErr_CheckSignals())

(i.e. the code will (nearly) not even call PyErr_CheckSignals).

I guess this is some c compiler optimization issue (seems like mine does
a better job at optimizing :)
History
Date User Action Args
2008-01-04 18:48:22schmirsetspambayes_score: 0.021784 -> 0.021784041
recipients: + schmir, loewis, effbot, facundobatista, joshhoyt
2008-01-04 18:48:22schmirsetspambayes_score: 0.021784 -> 0.021784
messageid: <1199472502.25.0.997529625316.issue846388@psf.upfronthosting.co.za>
2008-01-04 18:48:22schmirlinkissue846388 messages
2008-01-04 18:48:22schmircreate