Bottleneck? More efficient regular expression?

Andrew Dalke adalke at mindspring.com
Wed Sep 24 00:56:36 EDT 2003


Jeremy Fincher:
> That was caused by the multitude of non-greedy quantifiers you've got
> in there.

Except it wasn't reproducible on my machine.

It may be that she was using a Mac, which has an absurdly
low stack space compared to the other machines I used.
But still, I couldn't figure out why it would use that much
stack space.  There's only about 300 characters in that
text, so even if every character caused a stack push it still
shouldn't have created a problem.

What I really suspect is that she shortened her data
before reporting the problem.  It claims to have 335
residues in the alignment but she only reports about 20.

Tina?  If this is the case then please remember next time
to report something which actually causes the bug rather
than something you think may cause the bug.  Doing so
may also give you clues to what's wrong and makes our
life that much easier.

> If you haven't yet read Friedl's "Mastering Regular Expressions," it's
> quite elucidating.

I second that motion.

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list