On 3/2/22 7:44 PM, Jerry Jensen via use-livecode wrote:
Instead of putting the keys into tCorrWdList and using
“among the lines of tCorrWdList",
how about using “among the keys of tCorrWdList”?

Judging from no knowledge of the internals but guessing what it must do:
“among the lines” has to look for all the line endings (unicode!),
but “among the keys” can jump along by constant offsets since
the keys are all fixed length hashes ?
The lines happen to be all the same length, but “among the lines” can’t assume 
that and has to go look.

Maybe I’m missing something again . . .
.Jerry

Actually, this is what I do:

  if sDictFile[L] = true then...

which I thought would be pretty fast since it's accessing the array directly. The array looks like this:

sDictFile
  word1 -> true
  word2 -> true
  word3 -> true

And my loop does this, for each user word:

  if sDictFile["word2"] = true then...

so I'm not really looping through the keys, just looking for a matching one. The loop is for each user word I need to find. If there's no key, then the word isn't legal. I hope that makes sense.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to