summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-09 06:05:53 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-09 06:05:53 (GMT)
commit1228d134dd6969c0091174062673fea6ccfc521f (patch)
tree14f9b994b4af6082b9a9b7dea53de4da1b4c7e57 /benchmark
parentb06514105056ebaf60804749bfba2c56fe4a6a69 (diff)
* benchmark/bm_vm3_gc_old_full.rb: add GC.start benchmark.
* benchmark/bm_vm3_gc_old_immediate.rb: ditto. * benchmark/bm_vm3_gc_old_lazy.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/bm_vm3_gc_old_full.rb4
-rw-r--r--benchmark/bm_vm3_gc_old_immediate.rb4
-rw-r--r--benchmark/bm_vm3_gc_old_lazy.rb4
3 files changed, 12 insertions, 0 deletions
diff --git a/benchmark/bm_vm3_gc_old_full.rb b/benchmark/bm_vm3_gc_old_full.rb
new file mode 100644
index 0000000..cfdfc8c
--- /dev/null
+++ b/benchmark/bm_vm3_gc_old_full.rb
@@ -0,0 +1,4 @@
+old_object = Array.new(1_000_000){''}
+100.times do
+ GC.start
+end
diff --git a/benchmark/bm_vm3_gc_old_immediate.rb b/benchmark/bm_vm3_gc_old_immediate.rb
new file mode 100644
index 0000000..ad22feb
--- /dev/null
+++ b/benchmark/bm_vm3_gc_old_immediate.rb
@@ -0,0 +1,4 @@
+old_object = Array.new(1_000_000){''}
+30_000.times do
+ GC.start(full_mark: false, immediate_sweep: true)
+end
diff --git a/benchmark/bm_vm3_gc_old_lazy.rb b/benchmark/bm_vm3_gc_old_lazy.rb
new file mode 100644
index 0000000..b74d44b
--- /dev/null
+++ b/benchmark/bm_vm3_gc_old_lazy.rb
@@ -0,0 +1,4 @@
+old_object = Array.new(1_000_000){''}
+30_000.times do
+ GC.start(full_mark: false, immediate_sweep: false)
+end