large arrays
larry at significantplanet.org
larry at significantplanet.org
Fri Sep 19 14:19:06 EDT 2014
Hello Richard,
Here are the numbers:
I wrote a program that is an anagram finder several years ago using Rev 2.9
and had NO problems with the arrays.
As I mentioned, it choked starting with Rev 3.5 and every iteration of Rev
or LC that I've tried since, up to the current 6.1.1 (rc 4)
I haven't tried it in LC 7.0 yet.
I have a hidden stack with my word fields in it - for words in length from 2
to 12. The word lists are optimized with a key for faster searching.
When the program loads, it puts each of the 11 word list fields into one
array - which takes about 1 second on my XP with 4gb of ram.
The word lists vary in length (3-ltr words is 1292 lines & the largest,
9-ltr words, is 40,727 lines.) Each line in all the lists averages less
than 100 characters.
The size of the field for 9-ltr words is 796kb if copied into a txt
document.
My old computer that I wrote the original program on with Rev 2.9 had less
than 1gb of ram, so I don't think that is the issue.
If I put in a 9 letter word such as ELEPHANTS, the program will find all
anagrams (words found within the letters of ELEPHANTS) in about 4/10 of a
second. The time varies slightly depending on whatever else is going on with
my computer. That's a total of 596 words with my word lists and the program
lists words and the number of words for each word length from 9 to 2.
So the compiled version of my program works very satisfactorily. I'm now
adding some other features to the program and, as I said, it is like trying
to program on a typewriter that is full of mud.
I spoke to someone at RunRev years ago and they acknowledged that there was
an issue with arrays. Maybe it has been fixed in 7.0, but I haven't tried
that yet.
If you have any additional insights, I sure would appreciate it.
Thanks,
Larry
----- Original Message -----
From: "Richard Gaskin" <ambassador at fourthworld.com>
To: <use-livecode at lists.runrev.com>
Sent: Friday, September 19, 2014 10:18 AM
Subject: Re: large arrays
> Just curious: How large is large?
>
> It would be interesting to know the number of elements. depth, and
> aggregate size.
>
> --
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> ____________________________________________________________________
> Ambassador at FourthWorld.com http://www.FourthWorld.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list