From: "Sandor Szücs" Date: 2009-02-03T01:33:15+09:00 Subject: Re: Quicker finding strings? Alternative for array, hash, set? On 02.02.2009, at 15:37, Patrick Put wrote: >> If you do not want to attach information to those words then a Set is >> more appropriate: same O(1) lookup but no key value mapping. > Is the implementation "under the hood" the same? Set uses a Hash as storage. See set.rb: --------------8<------------- # The equality of each couple of elements is determined according to # Object#eql? and Object#hash, since Set uses Hash as storage. -------------->8------------- regards, Sandor Szücs --