mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Benchmark for [Feature #16155]
This commit is contained in:
parent
99ca5705a2
commit
8390057d1e
1 changed files with 14 additions and 0 deletions
14
benchmark/array_intersection.yml
Normal file
14
benchmark/array_intersection.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
prelude: |
|
||||
small1 = [1, 2, 3]
|
||||
small2 = [1, 2, 3, 4, 5]
|
||||
small3 = [2, 3, 4, 5]
|
||||
small4 = [2]
|
||||
big1 = [1, 2, 3, 4] * 64
|
||||
big2 = [1, 2, 3] * 64
|
||||
big3 = [1, 2] * 64
|
||||
|
||||
benchmark:
|
||||
small-&: small1 & small2 & small3 & small4
|
||||
small-intersection: small1.intersection(small2, small3, small4)
|
||||
big-&: big1 & big2 & big3
|
||||
big-intersection: big1.intersection(big2, big3)
|
Loading…
Reference in a new issue