|
-
Feb 8th, 2010, 07:24 PM
#13
Re: Please help - Seach 100000 txt files very fast
One file would be enough. You can use the high resolution timer to see the performance of one file, do changes and compare. There is no reason to process everything each time. Also, it is good to locate the parts of code that run slowly.
For seeing the time it takes for code to run see this post.
The first thing that would be important to achieve is the correct behavior of the code. I guess we do need a sample text file so we can see where we stand with it. Later on, as we are dealing with words there is one other important thing: sorting before searching allows to optimize finding a great deal, and even later optimization would be binary tree search (or whatever it was, I haven't done it in practise myself, but it allows finding a matching string in just a very few steps in a million strings). These together would probably nail it down to a few seconds at worst. But before we can go there we need to have the correct results first.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|