jruby (owner)

Revisions

gist: 209558 Download_button fork
public
Public Clone URL: git://gist.github.com/209558.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
~/projects/rubinius/benchmark/tiers/0 ➔ cat bm_vm2_method.duby
import java.lang.System
 
def m
  nil
end
 
def run
  i=0
  while i<6000000 # benchmark loop 2
    i+=1
    m; m; m; m; m; m; m; m;
  end
  nil
end
 
i = 0
while i < 50
  time = System.currentTimeMillis
  run
  puts System.currentTimeMillis - time
  i+= 1
end
 
~/projects/rubinius/benchmark/tiers/0 ➔ cat bm_vm2_method.rb
def m
  nil
end
 
def Bench.run
  i=0
  while i<6000000 # benchmark loop 2
    i+=1
    m; m; m; m; m; m; m; m;
  end
end
 
~/projects/rubinius/benchmark/tiers/0 ➔ ../../../../duby/bin/duby bm_vm2_method.duby
8
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0