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_grep_v_100.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
129 B
Ruby

grep_data = (1..10).to_a * 1000
N = 100
enum = grep_data.lazy.grep_v(->(i){i == 0}).grep_v(->(i){i == 0})
N.times {enum.each {}}