P
PeteCresswell
Has anybody taken the time to compare how fast something can be found
by searching an array with how fast it can be found using a
Table.Seek?
On one hand, it seems like array searches can be really fast - even
faster if one takes the time to do it binarily instead of just from
top-to-bottom.
On the other hand, if the table is on a user's local drive, one would
think that some really smart people have optimized the .Seek routines
and maybe it could be as fast or faster with less developer hours
invested.
Specifically, I'm thinking of identifying business days. Saturday/
Sunday is a no-brainer, but the holidays currently involve disk I/O
for every determination.
I was thinking of copying the holiday table into a static/persistant
array in the routine, which gets re-built every N ticks (just to catch
the occasional user update to the table) and searched instead of doing
the disk I/O for each business day determination.
We're currently doing that disk I/O using Dynaset.FindFirst instead of
Table.Seek and it's kicking the brains out of whoever's PC is doing a
lot of business day determinations.
The question, then, seems to be whether to take the easy path and just
change over to Table.Seek or invest the man hours in the array
approach.
by searching an array with how fast it can be found using a
Table.Seek?
On one hand, it seems like array searches can be really fast - even
faster if one takes the time to do it binarily instead of just from
top-to-bottom.
On the other hand, if the table is on a user's local drive, one would
think that some really smart people have optimized the .Seek routines
and maybe it could be as fast or faster with less developer hours
invested.
Specifically, I'm thinking of identifying business days. Saturday/
Sunday is a no-brainer, but the holidays currently involve disk I/O
for every determination.
I was thinking of copying the holiday table into a static/persistant
array in the routine, which gets re-built every N ticks (just to catch
the occasional user update to the table) and searched instead of doing
the disk I/O for each business day determination.
We're currently doing that disk I/O using Dynaset.FindFirst instead of
Table.Seek and it's kicking the brains out of whoever's PC is doing a
lot of business day determinations.
The question, then, seems to be whether to take the easy path and just
change over to Table.Seek or invest the man hours in the array
approach.