summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--benchmark/bm_hash_to_proc.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/benchmark/bm_hash_to_proc.rb b/benchmark/bm_hash_to_proc.rb
new file mode 100644
index 0000000000..2b675bf509
--- /dev/null
+++ b/benchmark/bm_hash_to_proc.rb
@@ -0,0 +1,9 @@
+h = {}
+
+10000.times do |i|
+ h[i] = nil
+end
+
+5000.times do |i|
+ [i].map(&h)
+end