ruby-changes:40441
From: nobu <ko1@a...>
Date: Tue, 10 Nov 2015 18:23:00 +0900 (JST)
Subject: [ruby-changes:40441] nobu:r52522 (trunk): bm_hash_to_proc.rb
nobu 2015-11-10 18:22:37 +0900 (Tue, 10 Nov 2015) New Revision: 52522 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52522 Log: bm_hash_to_proc.rb * benchmark/bm_hash_to_proc.rb: benchmark for Hash#to_proc. [Feature #11653] Added files: trunk/benchmark/bm_hash_to_proc.rb Index: benchmark/bm_hash_to_proc.rb =================================================================== --- benchmark/bm_hash_to_proc.rb (revision 0) +++ benchmark/bm_hash_to_proc.rb (revision 52522) @@ -0,0 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_hash_to_proc.rb#L1 +h = {} + +10000.times do |i| + h[i] = nil +end + +5000.times do |i| + [i].map(&h) +end Property changes on: benchmark/bm_hash_to_proc.rb ___________________________________________________________________ Added: svn:eol-style + LF -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/