aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-28 18:10:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-28 18:10:16 +0000
commit9febb03a3c7827eb678ab69edbd14f614a249ef6 (patch)
tree5acf7a7e3b57aececb9ca141c4b3a196586ae67c /benchmark
parent5678c55134f7e8126843038c0e3911c4aba5f11a (diff)
downloadruby-9febb03a3c7827eb678ab69edbd14f614a249ef6.tar.gz
benchmark for symbol block passing
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/bm_vm2_symbol_block_pass.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/benchmark/bm_vm2_symbol_block_pass.rb b/benchmark/bm_vm2_symbol_block_pass.rb
new file mode 100644
index 0000000000..c8d6532bef
--- /dev/null
+++ b/benchmark/bm_vm2_symbol_block_pass.rb
@@ -0,0 +1,3 @@
+class C; 1000.times{|i|eval("def i#{i};end")}; end
+c = C.new; m = C.instance_methods(false)
+1_000.times{m.each{|n|c.tap(&n)}}