ruby-changes:54037
From: tenderlove <ko1@a...>
Date: Fri, 7 Dec 2018 03:20:21 +0900 (JST)
Subject: [ruby-changes:54037] tenderlove:r66256 (trunk): Add benchmark for hash small literals
tenderlove 2018-12-07 03:20:11 +0900 (Fri, 07 Dec 2018) New Revision: 66256 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66256 Log: Add benchmark for hash small literals Co-Authored-By: Krzysztof Rybka <krzysztof.rybka@g...> Added files: trunk/benchmark/hash_literal_small2.rb trunk/benchmark/hash_literal_small4.rb trunk/benchmark/hash_literal_small8.rb Index: benchmark/hash_literal_small2.rb =================================================================== --- benchmark/hash_literal_small2.rb (nonexistent) +++ benchmark/hash_literal_small2.rb (revision 66256) @@ -0,0 +1,3 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/hash_literal_small2.rb#L1 +# frozen_string_literal: true + +1_000_000.times.map { { "foo" => "bar", "bar" => "baz" } } Index: benchmark/hash_literal_small8.rb =================================================================== --- benchmark/hash_literal_small8.rb (nonexistent) +++ benchmark/hash_literal_small8.rb (revision 66256) @@ -0,0 +1,3 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/hash_literal_small8.rb#L1 +# frozen_string_literal: true + +1_000_000.times.map { { "foo" => "bar", "bar" => "baz", "baz" => "lol", "lol" => "lgtm", "lgtm" => "nope", "nope" => "ok", "ok" => "again", "again" => "wait" } } Index: benchmark/hash_literal_small4.rb =================================================================== --- benchmark/hash_literal_small4.rb (nonexistent) +++ benchmark/hash_literal_small4.rb (revision 66256) @@ -0,0 +1,3 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/hash_literal_small4.rb#L1 +# frozen_string_literal: true + +1_000_000.times.map { { "foo" => "bar", "bar" => "baz", "baz" => "lol", "lol" => "lgtm" } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/