ruby-changes:31819
From: glass <ko1@a...>
Date: Thu, 28 Nov 2013 19:50:49 +0900 (JST)
Subject: [ruby-changes:31819] glass:r43898 (trunk): * benchmark/bm_hash_flatten.rb: added. r43896 is about 4 times faster
glass 2013-11-28 19:50:41 +0900 (Thu, 28 Nov 2013) New Revision: 43898 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43898 Log: * benchmark/bm_hash_flatten.rb: added. r43896 is about 4 times faster than 2.0.0p353. * benchmark/bm_hash_keys.rb: added. r43896 is about 5 times faster than 2.0.0p353. * benchmark/bm_hash_values.rb: added. r43896 is about 5 times faster than 2.0.0p353. Added files: trunk/benchmark/bm_hash_flatten.rb trunk/benchmark/bm_hash_keys.rb trunk/benchmark/bm_hash_values.rb Modified files: trunk/ChangeLog Index: ChangeLog =================================================================== --- ChangeLog (revision 43897) +++ ChangeLog (revision 43898) @@ -1,3 +1,14 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Nov 28 19:43:45 2013 Masaki Matsushita <glass.saga@g...> + + * benchmark/bm_hash_flatten.rb: added. r43896 is about 4 times faster + than 2.0.0p353. + + * benchmark/bm_hash_keys.rb: added. r43896 is about 5 times faster + than 2.0.0p353. + + * benchmark/bm_hash_values.rb: added. r43896 is about 5 times faster + than 2.0.0p353. + Thu Nov 28 19:29:04 2013 Zachary Scott <e@z...> * doc/contributing.rdoc: [DOC] Add notes about slideshow proposals Index: benchmark/bm_hash_flatten.rb =================================================================== --- benchmark/bm_hash_flatten.rb (revision 0) +++ benchmark/bm_hash_flatten.rb (revision 43898) @@ -0,0 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_hash_flatten.rb#L1 +h = {} + +10000.times do |i| + h[i] = nil +end + +1000.times do + h.flatten +end Index: benchmark/bm_hash_keys.rb =================================================================== --- benchmark/bm_hash_keys.rb (revision 0) +++ benchmark/bm_hash_keys.rb (revision 43898) @@ -0,0 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_hash_keys.rb#L1 +h = {} + +10000.times do |i| + h[i] = nil +end + +5000.times do + h.keys +end Index: benchmark/bm_hash_values.rb =================================================================== --- benchmark/bm_hash_values.rb (revision 0) +++ benchmark/bm_hash_values.rb (revision 43898) @@ -0,0 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_hash_values.rb#L1 +h = {} + +10000.times do |i| + h[i] = nil +end + +5000.times do + h.values +end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/