From: SASADA Koichi Date: 2016-03-07T16:41:55+09:00 Subject: [ruby-core:74196] Re: [Ruby trunk Feature#12142] Hash tables with open addressing On 2016/03/07 14:17, shyouhei@ruby-lang.org wrote: > (WIP is definitely OK with me.) Let me think of a more realistic use case. I believe this is not frequent case. But Ruby is used by many people. We need to care about the Shyouhei's example (if we can). ---- here is random version of deletion and addition test (not only last element) (ref [ruby-core:74182]). ```ruby require 'objspace' h = 10.times.inject({}){|r, i| r[i] = i; r} 100_000.times{|i| key = rand(10) h.delete(key) # add h[key] = key puts "#{i}\t#{ObjectSpace.memsize_of(h)}" if (i % 1_000) == 0 } ``` result: http://www.atdot.net/fp_store/f.jvrn3o/file.copipa-temp-image.png -- // SASADA Koichi at atdot dot net Unsubscribe: