[前][次][番号順一覧][スレッド一覧][生データ]

yarv-diff:31

From: ko1 atdot.net
Date: 29 Jun 2005 13:38:13 -0000
Subject: [yarv-diff:31] r186 - trunk/benchmark

Author: ko1
Date: 2005-06-29 22:38:12 +0900 (Wed, 29 Jun 2005)
New Revision: 186

Added:
   trunk/benchmark/bm_app_factorial.rb
   trunk/benchmark/bm_app_fib.rb
   trunk/benchmark/bm_app_tak.rb
   trunk/benchmark/bm_app_tarai.rb
   trunk/benchmark/bm_vm1_block.rb
   trunk/benchmark/bm_vm1_const.rb
   trunk/benchmark/bm_vm1_proc.rb
   trunk/benchmark/bm_vm1_regexp.rb
   trunk/benchmark/bm_vm1_rescue.rb
   trunk/benchmark/bm_vm1_simpleiter.rb
   trunk/benchmark/bm_vm1_simplereturn.rb
   trunk/benchmark/bm_vm1_swap.rb
   trunk/benchmark/bm_vm2_array.rb
   trunk/benchmark/bm_vm2_ensure.rb
   trunk/benchmark/bm_vm2_method.rb
   trunk/benchmark/bm_vm2_poly_method.rb
   trunk/benchmark/bm_vm2_rescue2.rb
   trunk/benchmark/bm_vm2_strconcat.rb
   trunk/benchmark/bm_vm2_super.rb
   trunk/benchmark/bm_vm2_unif1.rb
   trunk/benchmark/bm_vm2_zsuper.rb
Removed:
   trunk/benchmark/bm_array.rb
   trunk/benchmark/bm_block.rb
   trunk/benchmark/bm_const.rb
   trunk/benchmark/bm_ensure.rb
   trunk/benchmark/bm_factorial.rb
   trunk/benchmark/bm_fib.rb
   trunk/benchmark/bm_method.rb
   trunk/benchmark/bm_poly_method.rb
   trunk/benchmark/bm_proc.rb
   trunk/benchmark/bm_regexp.rb
   trunk/benchmark/bm_rescue.rb
   trunk/benchmark/bm_rescue2.rb
   trunk/benchmark/bm_simpleiter.rb
   trunk/benchmark/bm_simplereturn.rb
   trunk/benchmark/bm_strconcat.rb
   trunk/benchmark/bm_super.rb
   trunk/benchmark/bm_swap.rb
   trunk/benchmark/bm_tak.rb
   trunk/benchmark/bm_tarai.rb
   trunk/benchmark/bm_unif1.rb
   trunk/benchmark/bm_zsuper.rb
Modified:
   trunk/benchmark/bm_loop_whileloop.rb
Log:
fix loops


Copied: trunk/benchmark/bm_app_factorial.rb (from rev 184, trunk/benchmark/bm_factorial.rb)

Copied: trunk/benchmark/bm_app_fib.rb (from rev 184, trunk/benchmark/bm_fib.rb)

Copied: trunk/benchmark/bm_app_tak.rb (from rev 184, trunk/benchmark/bm_tak.rb)

Copied: trunk/benchmark/bm_app_tarai.rb (from rev 184, trunk/benchmark/bm_tarai.rb)

Deleted: trunk/benchmark/bm_array.rb
===================================================================
--- trunk/benchmark/bm_array.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_array.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,5 +0,0 @@
-i=0
-while i<6000000 # benchmark loop 2
-  i+=1
-  a = [1,2,3,4,5,6,7,8,9,10]
-end

Deleted: trunk/benchmark/bm_block.rb
===================================================================
--- trunk/benchmark/bm_block.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_block.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,10 +0,0 @@
-def m
-  yield
-end
-
-i=0
-while i<30000000 # while loop 1
-  i+=1
-  m{
-  }
-end
\ No newline at end of file

Deleted: trunk/benchmark/bm_const.rb
===================================================================
--- trunk/benchmark/bm_const.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_const.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,8 +0,0 @@
-Const = 1
-
-i = 0
-while i<30000000 # while loop 1
-  i+= 1
-  j = Const
-  k = Const
-end

Deleted: trunk/benchmark/bm_ensure.rb
===================================================================
--- trunk/benchmark/bm_ensure.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_ensure.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,11 +0,0 @@
-i=0
-while i<30000000 # benchmark loop 1
-  i+=1
-  begin
-    begin
-    ensure
-    end
-  ensure
-  end
-end
-

Deleted: trunk/benchmark/bm_factorial.rb
===================================================================
--- trunk/benchmark/bm_factorial.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_factorial.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,11 +0,0 @@
-def fact(n)
-  if(n > 1)
-    n * fact(n-1)
-  else
-    1
-  end
-end
-
-30.times{
-  fact(7300)
-}
\ No newline at end of file

Deleted: trunk/benchmark/bm_fib.rb
===================================================================
--- trunk/benchmark/bm_fib.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_fib.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,10 +0,0 @@
-def fib n
-  if n < 3
-    1
-  else
-    fib(n-1) + fib(n-2)
-  end
-end
-
-fib(32)
-

Modified: trunk/benchmark/bm_loop_whileloop.rb
===================================================================
--- trunk/benchmark/bm_loop_whileloop.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_loop_whileloop.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,4 +1,4 @@
 i = 0
-while i<30000000
+while i<30000000 # benchmark loop 1
   i+=1
 end

Deleted: trunk/benchmark/bm_method.rb
===================================================================
--- trunk/benchmark/bm_method.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_method.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,8 +0,0 @@
-def m
-end
-
-i=0
-while i<6000000 # benchmark loop 2
-  i+=1
-  m; m; m; m; m; m; m; m; m; m
-end

Deleted: trunk/benchmark/bm_poly_method.rb
===================================================================
--- trunk/benchmark/bm_poly_method.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_poly_method.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,20 +0,0 @@
-class C1
-  def m
-    1
-  end
-end
-class C2
-  def m
-    2
-  end
-end
-
-o1 = C1.new
-o2 = C2.new
-
-i=0
-while i<6000000 # benchmark loop 2
-  o = (i % 2 == 0) ? o1 : o2
-  o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
-  i+=1
-end

Deleted: trunk/benchmark/bm_proc.rb
===================================================================
--- trunk/benchmark/bm_proc.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_proc.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,14 +0,0 @@
-def m &b
-  b
-end
-
-pr = m{
-  a = 1
-}
-
-i=0
-while i<6000000 # benchmark loop 2
-  i+=1
-  pr.call
-end
-

Deleted: trunk/benchmark/bm_regexp.rb
===================================================================
--- trunk/benchmark/bm_regexp.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_regexp.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,6 +0,0 @@
-i=0
-str = 'xxxhogexxx'
-while i<6000000 # benchmark loop 2
-  /hoge/ =~ str
-  i+=1
-end

Deleted: trunk/benchmark/bm_rescue.rb
===================================================================
--- trunk/benchmark/bm_rescue.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_rescue.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,7 +0,0 @@
-i=0
-while i<6000000 # benchmark loop 2
-  i+=1
-  begin
-  rescue
-  end
-end

Deleted: trunk/benchmark/bm_rescue2.rb
===================================================================
--- trunk/benchmark/bm_rescue2.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_rescue2.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,8 +0,0 @@
-i=0
-while i<100000
-  i+=1
-  begin
-    raise
-  rescue
-  end
-end

Deleted: trunk/benchmark/bm_simpleiter.rb
===================================================================
--- trunk/benchmark/bm_simpleiter.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_simpleiter.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,3 +0,0 @@
-1000000.times{|simpleiter|
-  simpleiter
-}

Deleted: trunk/benchmark/bm_simplereturn.rb
===================================================================
--- trunk/benchmark/bm_simplereturn.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_simplereturn.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,9 +0,0 @@
-def m
-  return 1
-end
-i=0
-while i<1000000
-  i+=1
-  m
-end
-

Deleted: trunk/benchmark/bm_strconcat.rb
===================================================================
--- trunk/benchmark/bm_strconcat.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_strconcat.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,5 +0,0 @@
-i=0
-while i<1000000
-  "#{1+1} #{1+1} #{1+1}"
-  i+=1
-end

Deleted: trunk/benchmark/bm_super.rb
===================================================================
--- trunk/benchmark/bm_super.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_super.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,20 +0,0 @@
-
-class C
-  def m
-    1
-  end
-end
-
-class CC < C
-  def m
-    super()
-  end
-end
-
-obj = CC.new
-
-i = 0
-while i<10000000
-  obj.m
-  i+=1
-end

Deleted: trunk/benchmark/bm_swap.rb
===================================================================
--- trunk/benchmark/bm_swap.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_swap.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,8 +0,0 @@
-a = 1
-b = 2
-i=0
-while i<10000000
-  i+=1
-  a, b = b, a
-end
-

Deleted: trunk/benchmark/bm_tak.rb
===================================================================
--- trunk/benchmark/bm_tak.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_tak.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,13 +0,0 @@
-
-def tak x, y, z
-  unless y < x
-    z
-  else
-    tak( tak(x-1, y, z),
-         tak(y-1, z, x),
-         tak(z-1, x, y))
-  end
-end
-
-tak(18, 9, 0)
-

Deleted: trunk/benchmark/bm_tarai.rb
===================================================================
--- trunk/benchmark/bm_tarai.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_tarai.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,10 +0,0 @@
-def tarai( x, y, z )
-  if x <= y
-  then y
-  else tarai(tarai(x-1, y, z),
-             tarai(y-1, z, x),
-             tarai(z-1, x, y))
-  end
-end
-
-tarai(12, 6, 0)

Deleted: trunk/benchmark/bm_unif1.rb
===================================================================
--- trunk/benchmark/bm_unif1.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_unif1.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,8 +0,0 @@
-i = 0
-def m a, b
-end
-
-while i<10000000
-  i+=1
-  m 100, 200
-end

Copied: trunk/benchmark/bm_vm1_block.rb (from rev 185, trunk/benchmark/bm_block.rb)

Copied: trunk/benchmark/bm_vm1_const.rb (from rev 185, trunk/benchmark/bm_const.rb)

Copied: trunk/benchmark/bm_vm1_proc.rb (from rev 185, trunk/benchmark/bm_proc.rb)
===================================================================
--- trunk/benchmark/bm_proc.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_vm1_proc.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -0,0 +1,14 @@
+def m &b
+  b
+end
+
+pr = m{
+  a = 1
+}
+
+i=0
+while i<30000000 # while loop 1
+  i+=1
+  pr.call
+end
+

Copied: trunk/benchmark/bm_vm1_regexp.rb (from rev 185, trunk/benchmark/bm_regexp.rb)
===================================================================
--- trunk/benchmark/bm_regexp.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_vm1_regexp.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -0,0 +1,6 @@
+i=0
+str = 'xxxhogexxx'
+while i<30000000 # while loop 1
+  /hoge/ =~ str
+  i+=1
+end

Copied: trunk/benchmark/bm_vm1_rescue.rb (from rev 185, trunk/benchmark/bm_rescue.rb)
===================================================================
--- trunk/benchmark/bm_rescue.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_vm1_rescue.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -0,0 +1,7 @@
+i=0
+while i<30000000 # while loop 1
+  i+=1
+  begin
+  rescue
+  end
+end

Copied: trunk/benchmark/bm_vm1_simpleiter.rb (from rev 184, trunk/benchmark/bm_simpleiter.rb)

Copied: trunk/benchmark/bm_vm1_simplereturn.rb (from rev 184, trunk/benchmark/bm_simplereturn.rb)
===================================================================
--- trunk/benchmark/bm_simplereturn.rb	2005-06-29 07:19:03 UTC (rev 184)
+++ trunk/benchmark/bm_vm1_simplereturn.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -0,0 +1,9 @@
+def m
+  return 1
+end
+i=0
+while i<30000000 # while loop 1
+  i+=1
+  m
+end
+

Copied: trunk/benchmark/bm_vm1_swap.rb (from rev 184, trunk/benchmark/bm_swap.rb)
===================================================================
--- trunk/benchmark/bm_swap.rb	2005-06-29 07:19:03 UTC (rev 184)
+++ trunk/benchmark/bm_vm1_swap.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -0,0 +1,8 @@
+a = 1
+b = 2
+i=0
+while i<30000000 # while loop 1
+  i+=1
+  a, b = b, a
+end
+

Copied: trunk/benchmark/bm_vm2_array.rb (from rev 185, trunk/benchmark/bm_array.rb)

Copied: trunk/benchmark/bm_vm2_ensure.rb (from rev 185, trunk/benchmark/bm_ensure.rb)

Copied: trunk/benchmark/bm_vm2_method.rb (from rev 185, trunk/benchmark/bm_method.rb)

Copied: trunk/benchmark/bm_vm2_poly_method.rb (from rev 185, trunk/benchmark/bm_poly_method.rb)

Added: trunk/benchmark/bm_vm2_rescue2.rb
===================================================================
--- trunk/benchmark/bm_vm2_rescue2.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_vm2_rescue2.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -0,0 +1,8 @@
+i=0
+while i<6000000 # benchmark loop 2
+  i+=1
+  begin
+    raise
+  rescue
+  end
+end

Copied: trunk/benchmark/bm_vm2_strconcat.rb (from rev 184, trunk/benchmark/bm_strconcat.rb)
===================================================================
--- trunk/benchmark/bm_strconcat.rb	2005-06-29 07:19:03 UTC (rev 184)
+++ trunk/benchmark/bm_vm2_strconcat.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -0,0 +1,5 @@
+i=0
+while i<6000000 # benchmark loop 2
+  "#{1+1} #{1+1} #{1+1}"
+  i+=1
+end

Copied: trunk/benchmark/bm_vm2_super.rb (from rev 184, trunk/benchmark/bm_super.rb)
===================================================================
--- trunk/benchmark/bm_super.rb	2005-06-29 07:19:03 UTC (rev 184)
+++ trunk/benchmark/bm_vm2_super.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -0,0 +1,20 @@
+
+class C
+  def m
+    1
+  end
+end
+
+class CC < C
+  def m
+    super()
+  end
+end
+
+obj = CC.new
+
+i = 0
+while i<6000000 # benchmark loop 2
+  obj.m
+  i+=1
+end

Copied: trunk/benchmark/bm_vm2_unif1.rb (from rev 184, trunk/benchmark/bm_unif1.rb)
===================================================================
--- trunk/benchmark/bm_unif1.rb	2005-06-29 07:19:03 UTC (rev 184)
+++ trunk/benchmark/bm_vm2_unif1.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -0,0 +1,8 @@
+i = 0
+def m a, b
+end
+
+while i<6000000 # benchmark loop 2
+  i+=1
+  m 100, 200
+end

Copied: trunk/benchmark/bm_vm2_zsuper.rb (from rev 184, trunk/benchmark/bm_zsuper.rb)
===================================================================
--- trunk/benchmark/bm_zsuper.rb	2005-06-29 07:19:03 UTC (rev 184)
+++ trunk/benchmark/bm_vm2_zsuper.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -0,0 +1,20 @@
+i = 0
+
+class C
+  def m a
+    1
+  end
+end
+
+class CC < C
+  def m a
+    super
+  end
+end
+
+obj = CC.new
+
+while i<6000000 # benchmark loop 2
+  obj.m 10
+  i+=1
+end

Deleted: trunk/benchmark/bm_zsuper.rb
===================================================================
--- trunk/benchmark/bm_zsuper.rb	2005-06-29 13:29:51 UTC (rev 185)
+++ trunk/benchmark/bm_zsuper.rb	2005-06-29 13:38:12 UTC (rev 186)
@@ -1,20 +0,0 @@
-i = 0
-
-class C
-  def m a
-    1
-  end
-end
-
-class CC < C
-  def m a
-    super
-  end
-end
-
-obj = CC.new
-
-while i<10000000
-  obj.m 10
-  i+=1
-end


--
ML: yarv-diff quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]