Results 1 to 4 of 4

Thread: Need some ideas here...

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Cleveland, Ohio
    Posts
    263

    Post

    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?

  2. #2
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308

    Post

    I would a Collection with CStr(Date/Time) as a Key, but it will work slower then array.

  3. #3
    Hyperactive Member Juan Carlos Rey's Avatar
    Join Date
    Aug 1999
    Location
    Mendoza, Argentina
    Posts
    301

    Post

    Can you in any way sort your array,
    and then compare with only the max / min values?

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Cleveland, Ohio
    Posts
    263

    Post

    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
  •  



Click Here to Expand Forum to Full Width