aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/enum_lazy_uniq_50.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-16 00:58:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-16 00:58:21 +0000
commitdc4a5f48c745b333d8fa6c410bc70e886d606db9 (patch)
tree8a21240e489024ff3f99362ab01b80ef832a490e /benchmark/enum_lazy_uniq_50.rb
parentdfac111ae4f9d0ae73f614b5ce0e665998f022b0 (diff)
downloadruby-dc4a5f48c745b333d8fa6c410bc70e886d606db9.tar.gz
Adding Enumerator::Lazy#uniq and Enumerator::Lazy#grep_v to proc chaining
[Feature #14994] [Fix GH-1930] From: Anmol Chopra <chopraanmol1@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark/enum_lazy_uniq_50.rb')
-rw-r--r--benchmark/enum_lazy_uniq_50.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/benchmark/enum_lazy_uniq_50.rb b/benchmark/enum_lazy_uniq_50.rb
new file mode 100644
index 0000000000..59a39b78ff
--- /dev/null
+++ b/benchmark/enum_lazy_uniq_50.rb
@@ -0,0 +1,4 @@
+uniq_data = (1..10_000).to_a
+N = 100
+enum = uniq_data.lazy.uniq {|i| i % 5000}.uniq {|i| i % 5000}
+N.times {enum.each {}}