repo.or.cz
/
ruby-svn.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git]
/
benchmark
/
bm_vm2_poly_method.rb
blob
ac9953ce5f4e71143f99f7bad5b87ff5e48baa35
1
class C1
2
def m
3
1
4
end
5
end
6
class C2
7
def m
8
2
9
end
10
end
11
12
o1 = C1.new
13
o2 = C2.new
14
15
i=0
16
while i<6000000 # benchmark loop 2
17
o = (i % 2 == 0) ? o1 : o2
18
o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
19
i+=1
20
end