LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default Load text file into memory for searching?

It is. Because right now, I have something that searches through the text
line by line with textCompare and it is quite slow (averaging about 3-4
seconds per search). Will the Binary method help in speeding things up?

I remember a friend once told me that if you load a text file into memory
and perform binary search, the maximum amount of time is equal to Log(N) vs
if you read it line by line its maximum time is N. I'm new to programming so
if someone can enlighten me on this, it'll be much appreciated.

"NickHK" wrote:

Check out the Open statement in the VBA Help: Their example of
Open "TESTFILE" For Binary Access Write As #1

However, if this is connected with your 1 ~ 5 million row text file, you
will probably have to do it in chunks.

NickHK

"J@Y" wrote in message
...
Is it possible to load a text file into memeory and perform binary

searches
to increase speed?




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code for searching & copying Text from 1 text file to another J@Y Excel Programming 2 June 27th 07 04:16 PM
load/parse large text file Keith R Excel Programming 10 April 9th 07 09:49 PM
load a CSV file and have it take all fields as text cj Excel Discussion (Misc queries) 5 March 29th 07 02:24 PM
Can I load text file into Excel seting field delimter using cmd li Tim Excel Discussion (Misc queries) 0 April 19th 05 01:55 AM
Load text file and write back sanjay Excel Programming 1 May 26th 04 03:28 AM


All times are GMT +1. The time now is 02:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"