[ruby-cvs:78752] 254477248c (master): Skip optimized method check for most method IDs
"John Hawthorn" <[email protected]>
| Newsgroups | gmane.comp.lang.ruby.cvs |
|---|---|
| Message-ID | <[email protected]> |
John Hawthorn 2019-12-13 08:47:59 +0900 (Fri, 13 Dec 2019)
New Revision: 254477248c
https://github.com/ruby/ruby/commit/254477248c
Log:
Skip optimized method check for most method IDs
Previously every time a method was defined on a module, we would
recursively walk all subclasses to see if the module was included in a
class which the VM optimizes for (such as Integer#+).
For most method definitions we can tell immediately that this won't be
the case based on the method's name. To do this we just keep a hash with
method IDs of optimized methods and if our new method isn't in that list
we don't need to check subclasses at all.
Modified files:
internal.h
vm.c
vm_method.c