Help with script with performance problems

Miki Tebeka mikit at zoran.co.il
Sun Nov 23 05:13:51 EST 2003


Hello Dennis,

A general note: Use the "hotshot" module to find where you spend most of your time.

>         splitline = string.split(line)
My guess is that if you'll use the "re" module things will be much faster.

import re
ws_split = re.compile("\s+").split
...
splitline = split(line)
...

HTH.

Miki




More information about the Python-list mailing list