CGI question
Richard K. Herz
herz at ucsd.edu
Sun May 11 18:32:01 EDT 2003
Richard Gaskin <ambassador at fourthworld.com> wrote:
> HyperCard's proprietary find algorithm is indeedd the fastest search in
> any xTalk. But I think you'll find that's one of the very few areas in
> which MC isn't at least an order of magnitude faster. ;)
>
> How fast was your offset-based search?
Here are times for finding a string in any field in each of 6 records (in
which that string was placed for the test) in a database with 5347 records
and 4,544,259 characters in a global variable in RAM. Times listed are for
using offset() to find target string, then search list of record start
character numbers for start of record, then display found list and complete
first record. Times for MC 2.5 on a 2.2 GHz Pentium 4 (366 MHz AMD-K6) and
with times in seconds:
0.6 (4) for all 6 records at start of database
1 (7) for 6 records spaced equally throughout database
0.6 (4) for all 6 records at end of database.
Each string find with offset() takes essentially the same time regardless of
the location of the string in the global. The time difference between
grouped and distributed records is due to how I find the start character of
each record.
The drawback is that I ended up writing my own database, which is only
partially complete. I recommend using one already written by someone else -
as long as you always have access to your data regardless of license status.
I started a long time ago when I first got HyperCard and after my data got
"locked" into a commercial literature reference database: I lost the floppy
you had to insert every so many uses, the company said "tough - pay us the
full license fee again," so I decided to never let my data get locked up
again! I had a backup copy of the software with a few startups left, so I
got my data out, at least.
Rich Herz
herz at ucsd.edu
www.ReactorLab.net
More information about the metacard
mailing list