mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
17 lines
267 B
YAML
17 lines
267 B
YAML
|
prelude: |
|
||
|
named_module = Kernel
|
||
|
|
||
|
module FakeName
|
||
|
def self.name
|
||
|
"NotMyame".freeze
|
||
|
end
|
||
|
end
|
||
|
|
||
|
MOD_NAME = Module.instance_method(:name)
|
||
|
|
||
|
benchmark:
|
||
|
fastpath: MOD_NAME.bind_call(Kernel)
|
||
|
slowpath: MOD_NAME.bind_call(FakeName)
|
||
|
|
||
|
loop_count: 100_000
|