Arrays: new and old keys, i
David Bovill
david at vaudevillecourt.tv
Sun Sep 14 07:14:21 EDT 2008
2008/9/14 Richard Gaskin <ambassador at fourthworld.com>
>
> For accessing specific elements from large collections, arrays outperform
> any lineoffset in lists or any other method I can think of by several orders
> of magnitude.*
>
> Read, "It's a good hash mechanism". :)
>
> When I need ordinal sequential access, I use ordinal keys. Am I some sort
> of freak?
Most of the time I need both with the same data - classic example would be
paragraphs of text with indented titles (an outline index) - or a tree of
objects and their properties. I want the data in a way in which I can
interact with the keys (titles in a hierarchical structure) - and display or
process the data (say a paragraph of text) asociated with that key.
Order sometimes does not matter = click display paragraph - but often does
= reconstruct document. In short I want a simple data model which does both.
With sequentially ordered array keys we would have that.
More information about the use-livecode
mailing list