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

ruby-changes:60770

From: Takashi <ko1@a...>
Date: Tue, 14 Apr 2020 13:38:01 +0900 (JST)
Subject: [ruby-changes:60770] f883d6219e (master): Unify vm benchmark prefixes to vm_ (#3028)

https://git.ruby-lang.org/ruby.git/commit/?id=f883d6219e

From f883d6219e107554ebde5dff6d2f8383857f7518 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Mon, 13 Apr 2020 21:37:42 -0700
Subject: Unify vm benchmark prefixes to vm_ (#3028)

The vm1_ prefix and vm2_ had had special meaning until
820ad9cb1d72d0897b73dae282df3793814b27e8 and
12068aa4e980ab32a0438408a519030e65dabf5e. AFAIK there's no special
meaning in vm3_ prefix.

As they have confused people (like "In `benchmark` what is difference
between `vm1_`, `vm2_` and `vm3_`"), I'd like to remove the obsoleted
prefix as we obviated that two years ago.

diff --git a/benchmark/README.md b/benchmark/README.md
index 24a2669..c6d7cc3 100644
--- a/benchmark/README.md
+++ b/benchmark/README.md
@@ -53,11 +53,11 @@ make benchmark https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L53
 # Or compare with specific ruby binary
 make benchmark COMPARE_RUBY="/path/to/ruby --jit"
 
-# Run vm1 benchmarks
-make benchmark ITEM=vm1
+# Run vm benchmarks
+make benchmark ITEM=vm
 
 # Run some limited benchmarks in ITEM-matched files
-make benchmark ITEM=vm1 OPTS=--filter=block
+make benchmark ITEM=vm OPTS=--filter=block
 
 # You can specify the benchmark by an exact filename instead of using the default argument:
 # ARGS = $$(find $(srcdir)/benchmark -maxdepth 1 -name '*$(ITEM)*.yml' -o -name '*$(ITEM)*.rb')
@@ -68,5 +68,5 @@ make benchmark OPTS="--help" https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L68
 
 # With `make benchmark`, some special runner plugins are available:
 #   -r peak, -r size, -r total, -r utime, -r stime, -r cutime, -r cstime
-make benchmark ITEM=vm2_bigarray OPTS="-r peak"
+make benchmark ITEM=vm_bigarray OPTS="-r peak"
 ```
diff --git a/benchmark/vm1_attr_ivar.yml b/benchmark/vm1_attr_ivar.yml
deleted file mode 100644
index f714dd9..0000000
--- a/benchmark/vm1_attr_ivar.yml
+++ /dev/null
@@ -1,14 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  class C
-    attr_reader :a, :b
-    def initialize
-      @a = nil
-      @b = nil
-    end
-  end
-  obj = C.new
-benchmark:
-  vm1_attr_ivar: |
-    j = obj.a
-    k = obj.b
-loop_count: 30000000
diff --git a/benchmark/vm1_attr_ivar_set.yml b/benchmark/vm1_attr_ivar_set.yml
deleted file mode 100644
index f383e59..0000000
--- a/benchmark/vm1_attr_ivar_set.yml
+++ /dev/null
@@ -1,14 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  class C
-    attr_accessor :a, :b
-    def initialize
-      @a = nil
-      @b = nil
-    end
-  end
-  obj = C.new
-benchmark:
-  vm1_attr_ivar_set: |
-    obj.a = 1
-    obj.b = 2
-loop_count: 30000000
diff --git a/benchmark/vm1_block.yml b/benchmark/vm1_block.yml
deleted file mode 100644
index ac7c940..0000000
--- a/benchmark/vm1_block.yml
+++ /dev/null
@@ -1,9 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  def m
-    yield
-  end
-benchmark:
-  vm1_block: |
-    m{
-    }
-loop_count: 30000000
diff --git a/benchmark/vm1_blockparam.yml b/benchmark/vm1_blockparam.yml
deleted file mode 100644
index 947b8c5..0000000
--- a/benchmark/vm1_blockparam.yml
+++ /dev/null
@@ -1,7 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  def m &b
-  end
-benchmark:
-  vm1_blockparam: |
-    m{}
-loop_count: 30000000
diff --git a/benchmark/vm1_blockparam_call.yml b/benchmark/vm1_blockparam_call.yml
deleted file mode 100644
index e2817a3..0000000
--- a/benchmark/vm1_blockparam_call.yml
+++ /dev/null
@@ -1,8 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  def m &b
-    b.call
-  end
-benchmark:
-  vm1_blockparam_call: |
-    m{}
-loop_count: 30000000
diff --git a/benchmark/vm1_blockparam_pass.yml b/benchmark/vm1_blockparam_pass.yml
deleted file mode 100644
index ca1bef3..0000000
--- a/benchmark/vm1_blockparam_pass.yml
+++ /dev/null
@@ -1,12 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  def bp_yield
-    yield
-  end
-
-  def bp_pass &b
-    bp_yield &b
-  end
-benchmark:
-  vm1_blockparam_pass: |
-    bp_pass{}
-loop_count: 30000000
diff --git a/benchmark/vm1_blockparam_yield.yml b/benchmark/vm1_blockparam_yield.yml
deleted file mode 100644
index 56ae617..0000000
--- a/benchmark/vm1_blockparam_yield.yml
+++ /dev/null
@@ -1,8 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  def bp_yield &b
-    yield
-  end
-benchmark:
-  vm1_blockparam_yield: |
-    bp_yield{}
-loop_count: 30000000
diff --git a/benchmark/vm1_const.yml b/benchmark/vm1_const.yml
deleted file mode 100644
index b98db15..0000000
--- a/benchmark/vm1_const.yml
+++ /dev/null
@@ -1,7 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  Const = 1
-benchmark:
-  vm1_const: |
-    j = Const
-    k = Const
-loop_count: 30000000
diff --git a/benchmark/vm1_ensure.yml b/benchmark/vm1_ensure.yml
deleted file mode 100644
index afbbe38..0000000
--- a/benchmark/vm1_ensure.yml
+++ /dev/null
@@ -1,14 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-# Not utilizing loop_count since using it for this is too unstable for now
-benchmark:
-  vm1_ensure: |
-    i = 0
-    while i<30_000_000
-      i += 1
-      begin
-        begin
-        ensure
-        end
-      ensure
-      end
-    end
-loop_count: 1
diff --git a/benchmark/vm1_float_simple.yml b/benchmark/vm1_float_simple.yml
deleted file mode 100644
index 4e9ad18..0000000
--- a/benchmark/vm1_float_simple.yml
+++ /dev/null
@@ -1,8 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  f = 0.0
-benchmark:
-  vm1_float_simple: |
-    f += 0.1; f -= 0.1
-    f += 0.1; f -= 0.1
-    f += 0.1; f -= 0.1
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_short_lived.yml b/benchmark/vm1_gc_short_lived.yml
deleted file mode 100644
index 8fdcb73..0000000
--- a/benchmark/vm1_gc_short_lived.yml
+++ /dev/null
@@ -1,9 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-benchmark:
-  vm1_gc_short_lived: |
-    a = '' # short-lived String
-    b = ''
-    c = ''
-    d = ''
-    e = ''
-    f = ''
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_short_with_complex_long.yml b/benchmark/vm1_gc_short_with_complex_long.yml
deleted file mode 100644
index c22ea74..0000000
--- a/benchmark/vm1_gc_short_with_complex_long.yml
+++ /dev/null
@@ -1,25 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  def nested_hash h, n
-    if n == 0
-      ''
-    else
-      10.times{
-        h[Object.new] = nested_hash(h, n-1)
-      }
-    end
-  end
-
-  long_lived = Hash.new
-  nested_hash long_lived, 6
-
-  GC.start
-  GC.start
-benchmark:
-  vm1_gc_short_with_complex_long: |
-    a = '' # short-lived String
-    b = ''
-    c = ''
-    d = ''
-    e = ''
-    f = ''
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_short_with_long.yml b/benchmark/vm1_gc_short_with_long.yml
deleted file mode 100644
index c731aae..0000000
--- a/benchmark/vm1_gc_short_with_long.yml
+++ /dev/null
@@ -1,13 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  long_lived = Array.new(1_000_000){|i| "#{i}"}
-  GC.start
-  GC.start
-benchmark:
-  vm1_gc_short_with_long: |
-    a = '' # short-lived String
-    b = ''
-    c = ''
-    d = ''
-    e = ''
-    f = ''
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_short_with_symbol.yml b/benchmark/vm1_gc_short_with_symbol.yml
deleted file mode 100644
index 7fc1abe..0000000
--- a/benchmark/vm1_gc_short_with_symbol.yml
+++ /dev/null
@@ -1,13 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  50_000.times{|i| sym = "sym#{i}".to_sym}
-  GC.start
-  GC.start
-benchmark:
-  vm1_gc_short_with_symbol: |
-    a = '' # short-lived String
-    b = ''
-    c = ''
-    d = ''
-    e = ''
-    f = ''
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_wb_ary.yml b/benchmark/vm1_gc_wb_ary.yml
deleted file mode 100644
index 50fb4b6..0000000
--- a/benchmark/vm1_gc_wb_ary.yml
+++ /dev/null
@@ -1,12 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  short_lived_ary = []
-
-  if RUBY_VERSION >= "2.2.0"
-    GC.start(full_mark: false, immediate_mark: true, immediate_sweep: true)
-  end
-
-  short_lived = ''
-benchmark:
-  vm1_gc_wb_ary: |
-    short_lived_ary[0] = short_lived # write barrier
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_wb_ary_promoted.yml b/benchmark/vm1_gc_wb_ary_promoted.yml
deleted file mode 100644
index cf9b5de..0000000
--- a/benchmark/vm1_gc_wb_ary_promoted.yml
+++ /dev/null
@@ -1,15 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  long_lived = []
-
-  if RUBY_VERSION > "2.2.0"
-    3.times{ GC.start(full_mark: false, immediate_mark: true, immediate_sweep: true) }
-  elsif
-    GC.start
-  end
-
-  short_lived = ''
-
-benchmark:
-  vm1_gc_wb_ary_promoted: |
-    long_lived[0] = short_lived # write barrier
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_wb_obj.yml b/benchmark/vm1_gc_wb_obj.yml
deleted file mode 100644
index 9dc08e7..0000000
--- a/benchmark/vm1_gc_wb_obj.yml
+++ /dev/null
@@ -1,15 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  class C
-    attr_accessor :foo
-  end
-  short_lived_obj = C.new
-
-  if RUBY_VERSION >= "2.2.0"
-    GC.start(full_mark: false, immediate_mark: true, immediate_sweep: true)
-  end
-
-  short_lived = ''
-benchmark:
-  vm1_gc_wb_obj: |
-    short_lived_obj.foo = short_lived # write barrier
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_wb_obj_promoted.yml b/benchmark/vm1_gc_wb_obj_promoted.yml
deleted file mode 100644
index 26859d2..0000000
--- a/benchmark/vm1_gc_wb_obj_promoted.yml
+++ /dev/null
@@ -1,17 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/README.md#L0
-prelude: |
-  class C
-    attr_accessor :foo
-  end
-  long_lived = C.new
-
-  if RUBY_VERSION >= "2.2.0"
-    3.times{ (... truncated)

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

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