|
-
Feb 12th, 2000, 05:15 AM
#1
Thread Starter
Hyperactive Member
Ok, I've got this control I've made, and one of the most important factors to its success is speed. The fastest way to make something fast, in terms of knowing which item to pick from of a group, is to avoid searching and a whole lotta items for one particular need.
So, in short, I have an array of dates, and I want to know if a particular date is already within it without checking all of the separate values. How can I do this, or whats another way of doing the same thing?
-
Feb 12th, 2000, 10:45 AM
#2
Hyperactive Member
I would a Collection with CStr(Date/Time) as a Key, but it will work slower then array.
-
Feb 12th, 2000, 12:08 PM
#3
Hyperactive Member
Can you in any way sort your array,
and then compare with only the max / min values?
-
Feb 12th, 2000, 12:35 PM
#4
Thread Starter
Hyperactive Member
Ok, think about it in this respect. Lets say I have all these dates stored as separate files in a directory. Lets say each file name is somehow determined from the date that it represents. So, as each situation arises where I come accross a point in the graph where I'd want to know if there's a point of information, something like:
Open "C:\whatever\" + Str(Date) + ".txt" For Output as #1
So if that file didn't exist, then an error handler would do something on the error that it doesn't exist; otherwise there's a file and that means there's a point. No searches required.
Although that sounds like a solution to my problem, it's NOT. I don't want to create a buttload of files, so please, creative geniouses, ideas?
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
|