From 7d6a26f2a1e19d248dcf6defcfdcf8ab1c821e0d Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 16 Aug 2018 00:58:21 +0000 Subject: Adding Enumerator::Lazy#uniq and Enumerator::Lazy#grep_v to proc chaining [Feature #14994] [Fix GH-1930] From: Anmol Chopra git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- benchmark/enum_lazy_uniq_100.rb | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 benchmark/enum_lazy_uniq_100.rb (limited to 'benchmark/enum_lazy_uniq_100.rb') diff --git a/benchmark/enum_lazy_uniq_100.rb b/benchmark/enum_lazy_uniq_100.rb new file mode 100644 index 0000000000..2e6434d9c4 --- /dev/null +++ b/benchmark/enum_lazy_uniq_100.rb @@ -0,0 +1,4 @@ +uniq_data = (1..10_000).to_a +N = 100 +enum = uniq_data.lazy.uniq {|i| i % 10000}.uniq {|i| i % 10000} +N.times {enum.each {}} -- cgit v1.2.3