diff options
Diffstat (limited to 'benchmark/other-lang')
| -rw-r--r-- | benchmark/other-lang/eval.rb | 4 | ||||
| -rw-r--r-- | benchmark/other-lang/fact.py | 2 | ||||
| -rw-r--r-- | benchmark/other-lang/fact.rb | 4 | ||||
| -rw-r--r-- | benchmark/other-lang/loop.rb | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/benchmark/other-lang/eval.rb b/benchmark/other-lang/eval.rb index 3875927389..48a2cea019 100644 --- a/benchmark/other-lang/eval.rb +++ b/benchmark/other-lang/eval.rb @@ -51,14 +51,14 @@ Bench.each{|b| require 'pp' # utime -puts Lang.join("\t") +puts Lang.join("\t") Bench.each_with_index{|b, bi| print b, "\t" puts Result[bi].map{|e| e[0]}.join("\t") } # rtime -puts Lang.join("\t") +puts Lang.join("\t") Bench.each_with_index{|b, bi| print b, "\t" puts Result[bi].map{|e| e[1]}.join("\t") diff --git a/benchmark/other-lang/fact.py b/benchmark/other-lang/fact.py index 01593965d9..1ce9f76275 100644 --- a/benchmark/other-lang/fact.py +++ b/benchmark/other-lang/fact.py @@ -3,7 +3,7 @@ def factL(n): r = 1 - for x in range(2, n): + for x in range(2, n+1): r *= x return r diff --git a/benchmark/other-lang/fact.rb b/benchmark/other-lang/fact.rb index 7e97b22b39..6cedc752cd 100644 --- a/benchmark/other-lang/fact.rb +++ b/benchmark/other-lang/fact.rb @@ -6,8 +6,8 @@ def fact(n) end end -i=0 +i = 0 while i<10000 - i+=1 + i += 1 fact(100) end diff --git a/benchmark/other-lang/loop.rb b/benchmark/other-lang/loop.rb index d43cef61f3..b367b9dbf3 100644 --- a/benchmark/other-lang/loop.rb +++ b/benchmark/other-lang/loop.rb @@ -1,4 +1,4 @@ -i=0 +i = 0 while i<30000000 - i+=1 + i += 1 end |
