large arrays

Richard Gaskin ambassador at fourthworld.com
Fri Sep 19 15:19:15 EDT 2014


larry wrote:

 > 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)

The current shipping version is 6.6.3, and the latest test version lower 
than 7 is 6.7RC2.

Please let us know if you see any significant change with either version.


 > 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.

If the problem is the time it takes to load the array, and the loading 
is happening from fields, the problem may not be in the arrays and 
perhaps in the field accesses.


 > 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.

So there are 11 elements in the array?

If you run the array through arrayEncode and obtain its length, what is 
the size reported?

    put len(arrayEncode(tSomeArray))


 > 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.

Is that the old time or the new time?  If new, what is the old time (or 
vice versa)?


 > I spoke to someone at RunRev years ago and they acknowledged that
 > there was an issue with arrays.

It would be interesting to know exactly what they'd said.  While arrays 
have undergone revision a few times over the years, they tend to be very 
fast in every version I've used.

Hopefully once we understand more of the details of your code we'll pin 
down the bottleneck and get your performance back on par.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list