mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
24 lines
313 B
YAML
24 lines
313 B
YAML
|
prelude: |
|
||
|
class Embedded
|
||
|
def initialize
|
||
|
@a = 1
|
||
|
@b = 1
|
||
|
@c = 1
|
||
|
end
|
||
|
end
|
||
|
|
||
|
class Extended
|
||
|
def initialize
|
||
|
@a = 1
|
||
|
@b = 1
|
||
|
@c = 1
|
||
|
@d = 1
|
||
|
@e = 1
|
||
|
@f = 1
|
||
|
end
|
||
|
end
|
||
|
benchmark:
|
||
|
embedded: Embedded.new
|
||
|
extended: Extended.new
|
||
|
loop_count: 20_000_000
|