[前][次][番号順一覧][スレッド一覧]

ruby-changes:51686

From: k0kubun <ko1@a...>
Date: Mon, 9 Jul 2018 02:23:03 +0900 (JST)
Subject: [ruby-changes:51686] k0kubun:r63898 (trunk): benchmark/vm2_struct_small_aset.yml: unwrap loop_count

k0kubun	2018-07-09 02:22:58 +0900 (Mon, 09 Jul 2018)

  New Revision: 63898

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63898

  Log:
    benchmark/vm2_struct_small_aset.yml: unwrap loop_count
    
    since `i` is involved in this script as well...

  Modified files:
    trunk/benchmark/vm2_struct_small_aset.yml
Index: benchmark/vm2_struct_small_aset.yml
===================================================================
--- benchmark/vm2_struct_small_aset.yml	(revision 63897)
+++ benchmark/vm2_struct_small_aset.yml	(revision 63898)
@@ -1,7 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/vm2_struct_small_aset.yml#L1
-prelude: |
-  s = Struct.new(:a, :b, :c)
-  x = s.new
+# loop_count is not utilized since `i` is involved in the script
 benchmark:
   vm2_struct_small_aset: |
-    x.a = i
-loop_count: 6000000
+    s = Struct.new(:a, :b, :c)
+    x = s.new
+    i = 0
+    while i<6_000_000
+      i += 1
+      x.a = i
+    end
+loop_count: 1

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]