ruby/benchmark/array_intersection.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 строки
371 B
YAML
Исходник Обычный вид История

2019-10-22 16:49:41 +03:00
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)