15 mps = 1.00 / (Time.now.to_f - @t1)
16 printf "Ruby %s := %0.2f\n", s, mps
22 ($oneMillion/8).times {
26 endTimer("slotAccesses ")
32 ($oneMillion/8).times {
33 @x = 1; @x = 1; @x = 1; @x = 1;
34 @x = 1; @x = 1; @x = 1; @x = 1;
41 ($oneMillion/8).times {
45 endTimer("blockActivations ")
48 def testInstantiations
50 ($oneMillion/8).times {
51 Tester.new; Tester.new; Tester.new; Tester.new;
52 Tester.new; Tester.new; Tester.new; Tester.new;
54 endTimer("instantiations ")
60 ($oneMillion/8).times {
64 endTimer("localAccesses ")
70 ($oneMillion/8).times {
71 v = 1; v = 2; v= 3; v= 4;
72 v = 1; v = 2; v= 3; v= 4;
74 endTimer("localSets ")
87 printf "Ruby version := \"%s\"", RUBY_VERSION
89 puts "// values in millions per second"