summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark')
-rwxr-xr-xbenchmark/bm_vm1_blockparam.rb9
-rwxr-xr-xbenchmark/bm_vm1_blockparam_call.rb9
-rwxr-xr-xbenchmark/bm_vm1_blockparam_pass.rb13
-rwxr-xr-xbenchmark/bm_vm1_blockparam_yield.rb9
4 files changed, 40 insertions, 0 deletions
diff --git a/benchmark/bm_vm1_blockparam.rb b/benchmark/bm_vm1_blockparam.rb
new file mode 100755
index 0000000000..11680a2e61
--- /dev/null
+++ b/benchmark/bm_vm1_blockparam.rb
@@ -0,0 +1,9 @@
+def m &b
+end
+
+i = 0
+while i<30_000_000 # while loop 1
+ i += 1
+ m{}
+end
+
diff --git a/benchmark/bm_vm1_blockparam_call.rb b/benchmark/bm_vm1_blockparam_call.rb
new file mode 100755
index 0000000000..f6102a2b5a
--- /dev/null
+++ b/benchmark/bm_vm1_blockparam_call.rb
@@ -0,0 +1,9 @@
+def m &b
+ b.call
+end
+
+i = 0
+while i<30_000_000 # while loop 1
+ i += 1
+ m{}
+end
diff --git a/benchmark/bm_vm1_blockparam_pass.rb b/benchmark/bm_vm1_blockparam_pass.rb
new file mode 100755
index 0000000000..10029a257a
--- /dev/null
+++ b/benchmark/bm_vm1_blockparam_pass.rb
@@ -0,0 +1,13 @@
+def bp_yield
+ yield
+end
+
+def bp_pass &b
+ bp_yield &b
+end
+
+i = 0
+while i<30_000_000 # while loop 1
+ i += 1
+ bp_pass{}
+end
diff --git a/benchmark/bm_vm1_blockparam_yield.rb b/benchmark/bm_vm1_blockparam_yield.rb
new file mode 100755
index 0000000000..6dc01ced7c
--- /dev/null
+++ b/benchmark/bm_vm1_blockparam_yield.rb
@@ -0,0 +1,9 @@
+def bp_yield &b
+ yield
+end
+
+i = 0
+while i<30_000_000 # while loop 1
+ i += 1
+ bp_yield{}
+end