From: Robert Dober Date: 2008-09-03T22:26:39+09:00 Subject: Re: Hash optimization question On Wed, Sep 3, 2008 at 11:24 AM, Robert Klemme wrote: > I guess it will be difficult to get both: fast hash lookup and > insertion on one hand and fast iteration on the other hand. Is it > worth the effort? I don't know. This depends on your application. > Where is this a problem for you? Maybe there is a more efficient data > structure for your particular problem. Long time not having been on the same thread Robert:) Well indeed I would suggest to anyone having problems with performance of small hashes to have a look at Array#assoc and #rassoc. The only problem is I do not know up to which number of pairs this behaves well. I guess n<20 should be quite safe. Maybe I will find some time to benchmark this later. Cheers Robert -- C'est véritablement utile puisque c'est joli. Antoine de Saint Exupéry