|
-
October 21st, 1999, 09:35 PM
#1
I need more speed Baby!
What is faster?:
Searching for a word through multiple text files (Additionally which is faster: all the files in their own directories, or all in the same directory?)
or
Searching for a word through one file that is the sum of all the other files by stepping through it one "group" at a time?
Brewguru99
-
October 22nd, 1999, 01:48 PM
#2
Re: I need more speed Baby!
Hey? What? No takers?
Brewguru99
-
October 22nd, 1999, 04:17 PM
#3
Re: I need more speed Baby!
The answer is - it depends. Single InStr can be a bit faster, but reading big file in memory can cause swapping, so it can be slower.
I think grouping files is not good idea.
-
October 22nd, 1999, 05:36 PM
#4
Re: I need more speed Baby!
In addition to Bruno's post - you'll also find that using the VB 'Like' command is a lot quicker to see if a text string contains the text you're looking for than using InStr (although it only tells you if it's there, it won't give you a position in the text so you'll still need InStr).
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
-
October 23rd, 1999, 05:51 AM
#5
Re: I need more speed Baby!
Hey, excellent Tip. We VBers need more speed with strings and every Tip is welcome.
"Like" works great with case-insensitive searches - Instr is slow when vbTextCompare option is used.
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
|