regarding threading
Andrew Dalke
adalke at mindspring.com
Tue Oct 14 13:57:18 EDT 2003
akash shetty:
> the file is 3.5GB . the search pattern is a ten letter
> string.the database consists of paragraphs.
> the code ive developed searches the data
> paragraphwise.
> (using xreadlines).
> but this takes an awful amt of time.(abt 7 mins)
How are you doing the search? character by character,
string.find, or regular expressions? What's a "paragraph"?
Might memory mapping the file speed things up?
If you don't have a multiple processor machine,
using threads won't make a difference. How many
processors do you have on a machine?
Andrew
dalke at dalkescientific.com
More information about the Python-list
mailing list