1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/benchmark/enum_lazy_uniq_20.rb
nobu 7d6a26f2a1 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
2018-08-16 00:58:21 +00:00

4 lines
122 B
Ruby

uniq_data = (1..10_000).to_a
N = 100
enum = uniq_data.lazy.uniq {|i| i % 2000}.uniq {|i| i % 2000}
N.times {enum.each {}}