1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* benchmark/bm_vm1_attr_ivar(_set).rb: added (for method dispatch speed).

* benchmark/bm_vm1_float_simple.rb: added (for flonum/float).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2012-10-14 18:53:01 +00:00
parent 7f052a7213
commit fd3b0dec4a
4 changed files with 41 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Mon Oct 15 03:51:46 2012 Koichi Sasada <ko1@atdot.net>
* benchmark/bm_vm1_attr_ivar(_set).rb: added (for method dispatch speed).
* benchmark/bm_vm1_float_simple.rb: added (for flonum/float).
Mon Oct 15 02:51:16 2012 Koichi Sasada <ko1@atdot.net>
* vm_eval.c (vm_call0_body): add new function.

View file

@ -0,0 +1,14 @@
class C
attr_reader :a, :b
def initialize
@a = nil
@b = nil
end
end
obj = C.new
i = 0
while i<30_000_000 # while loop 1
i+= 1
j = obj.a
k = obj.b
end

View file

@ -0,0 +1,14 @@
class C
attr_accessor :a, :b
def initialize
@a = nil
@b = nil
end
end
obj = C.new
i = 0
while i<30_000_000 # while loop 1
i+= 1
obj.a = 1
obj.b = 2
end

View file

@ -0,0 +1,7 @@
i= 0.0; f = 0.0
while i<30_000_000
i+= 1
f += 0.1; f -= 0.1
f += 0.1; f -= 0.1
f += 0.1; f -= 0.1
end