indexing for faster search of lists in a file??

Posted by kaushik on Stack Overflow See other posts from Stack Overflow or by kaushik
Published on 2010-05-31T05:33:21Z Indexed on 2010/05/31 5:52 UTC
Read the original article Hit count: 190

Filed under:

i have a file having around 1 lakh lists and have a another file with again a list of around an average of 50..

I want to compare 2nd item of list in second file with the 2nd element of 1st file and repeat this for each of the 50 lists in 2nd file and get the result of all the matching element. I have written the code for all this,but this is taking a lot of time as it need to check the whole the 1lakh list some 50 times..i want to improve the speed... please tell me how can i do this.... i cant not post my code as it is part of big code and will be difficult to infer anything from that... please tell what can be done to improve the speed??

thank u,

© Stack Overflow or respective owner

Related posts about python