------ art_44615_15211738.1156178915685 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/15/06, Hal Fulton <hal9000 / hypermetrics.com> wrote: > > Austin Ziegler wrote: > > On 8/14/06, Martin DeMello <martindemello / gmail.com> wrote: > > > >> OHash or Assoc or even Dict (though the latter at least implies an > >> O(1) lookup). > > > > > > Wouldn't it be the same as Hash lookup? It's still got every other > > characteristic of a Hash; it just guarantees an order that defaults to > > insertion order. > > OHash lookup should be as fast as Hash lookup. > > Insertion would be slightly slower, Not necessarily that was why I suggested an OrderedHash (where insertion would not be slower ) and a SortedHash (where indeed insertion would be slower) and iteration (and to_a) would > be slowed down more. again iteration would be slowed down - possibly a lot - in an OrdedHash but would not be slowed down in a SortedHash (with a price to pay on memory consumption and update times). Cheers Robert Hal > > > ------ art_44615_15211738.1156178915685--