From: Eric Wong Date: 2017-03-27T05:21:07+00:00 Subject: [ruby-dev:50046] Re: [Ruby trunk Bug#13343] Improve Hash#merge performance watson1978@gmail.com wrote: > https://bugs.ruby-lang.org/issues/13343 > ---------------------------------------- > Hash#merge will be faster around 60%. +Cc ruby-core, since your post was English (and I don't read Japanese) This is promising! > The patch is in https://github.com/ruby/ruby/pull/1533 We need to check for redefinition of initialize_dup and initialize_copy methods in Hash for this to be correct. Unfortunately for people optimizing Ruby, corner-case redefinition checks are probably necessary :< Also, I wonder if we can improve rb_funcall to better support inline caching. rb_funcall API is also bad since it cannot use inline cache for method lookup. Maybe a better C API can be introduced for faster function calls from C. Note: I checked commit c5d74afdb4cfea2a4c9ff432d9da82f0649a1e67 by having a "fetch = +refs/pull/*:refs/remotes/ruby/pull/*" line in a "remote" section of my .git/config. I did not use any proprietary API or JavaScript to view your changes.