forked from elmcraft/core-extra
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBenchmarks.elm
More file actions
582 lines (526 loc) · 21.6 KB
/
Benchmarks.elm
File metadata and controls
582 lines (526 loc) · 21.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
module Benchmarks exposing (main)
import Application.NegAbs
import Application.Sum
import Array exposing (Array)
import Array.Extra as Array
import Array.Extra.All
import Array.Extra.Any
import Array.Extra.FilterMap
import Array.Extra.IndexedMapToList
import Array.Extra.Intersperse
import Array.Extra.Map2
import Array.Extra.MapToList
import Array.Extra.Member
import Array.Extra.Reverse
import Array.Extra.Unzip
import Benchmark exposing (Benchmark, describe)
import Benchmark.Alternative exposing (rank)
import Benchmark.Runner.Alternative as BenchmarkRunner
import List.Extra
import List.Extra.DropRight
import List.Extra.GroupsOf
import List.Extra.InsertAt
import List.Extra.Lift
import List.Extra.NotMember
import List.Extra.TakeRight
import List.Extra.Unfoldr
import List.Extra.UniquePairs
import Maybe.Extra.AndMap
import Result.Extra
import Result.Extra.AndMap
import Set exposing (Set)
import Set.Extra.AreDisjoint
import Set.Extra.SymmetricDifference
import String.Extra.IsBlank
import String.Extra.RightOfLeftOf
main : BenchmarkRunner.Program
main =
describe "for core-extra"
[ application
, array
, arrayExtra
, listExtra
, tupleExtra
, setExtra
, stringExtra
, maybeExtra
, resultExtra
]
|> BenchmarkRunner.program
application : Benchmark
application =
describe "application"
[ rank "curry"
(\sum -> ints1To100 |> sum)
[ ( "name only", Application.Sum.nameOnlyCurried )
, ( "partially curried/applied", Application.Sum.partiallyCurried )
, ( "lambda, piping", Application.Sum.pipe )
, ( "lambda, fully applied", Application.Sum.lambdaFullyAppliedCurried )
, ( "lambda nested, fully applied", Application.Sum.lambdaNestedFullyAppliedCurried )
]
, rank "chain"
(\negAbs -> ints1To100 |> Array.map negAbs)
[ ( "declaration argument, |> |>", Application.NegAbs.declarationArgumentPipeline )
, ( "lambda, |> |>", Application.NegAbs.lambdaPipeline )
, ( "lambda, |> >>", Application.NegAbs.lambdaPipeComposeR )
, ( ">>", Application.NegAbs.composeR )
]
]
array : Benchmark
array =
describe "Array"
[ rank "Array.fold"
(\fold -> ints1To100 |> fold (+) 0)
[ ( "foldl", Array.foldl )
, ( "foldr", Array.foldr )
]
]
arrayExtra : Benchmark
arrayExtra =
describe "Array.Extra"
[ rank "mapToList"
(\mapToList -> ints1To100 |> mapToList negate)
[ ( "with foldr", Array.Extra.MapToList.withFoldr )
, ( "with Array.toIndexedList", Array.Extra.MapToList.withListMap )
]
, rank "indexedMapToList"
(\indexedMapToList ->
ints1To100 |> indexedMapToList Tuple.pair
)
[ ( "with Array.foldr", Array.Extra.IndexedMapToList.withFoldr )
, ( "with toIndexedList"
, Array.Extra.IndexedMapToList.withToIndexedList
)
, ( "with Array.indexedMap"
, Array.Extra.IndexedMapToList.withArrayIndexedMap
)
, ( "with List.indexedMap"
, Array.Extra.IndexedMapToList.withListIndexedMap
)
]
, rank "reverse"
(\reverse -> reverse ints1To100)
[ ( "with cons", Array.Extra.Reverse.withCons )
, ( "with List.reverse", Array.Extra.Reverse.withListReverse )
, ( "with push", Array.Extra.Reverse.withPush )
]
, let
zipped =
Array.zip ints1To100 ints1To100
in
rank "unzip"
(\unzip -> zipped |> unzip)
[ ( "with maps", Array.Extra.Unzip.withMaps )
, ( "with List.unzip", Array.Extra.Unzip.withListUnzip )
, ( "with push", Array.Extra.Unzip.wthPush )
, ( "with cons", Array.Extra.Unzip.wthCons )
]
, rank "map2"
(\map2 ->
map2 Tuple.pair ints1To100 ints1To100
)
[ ( "with List.map2", Array.Extra.Map2.withListMap2 )
, ( "with get", Array.Extra.Map2.withGet )
, ( "with un-cons", Array.Extra.Map2.withUncons )
]
, let
maybeInts =
Array.initialize 100
(\x ->
if (x |> modBy 3) == 0 then
Nothing
else
Just x
)
in
rank "filterMap"
(\filterMap -> maybeInts |> filterMap identity)
[ ( "with List.filterMap", Array.Extra.FilterMap.withListFilterMap )
, ( "with push", Array.Extra.FilterMap.withPush )
, ( "with cons", Array.Extra.FilterMap.withCons )
]
, let
allTrue =
Array.repeat 100 True
in
rank "all"
(\all -> allTrue |> all identity)
[ ( "recursive last", Array.Extra.All.recursiveLast )
, ( "recursive get", Array.Extra.All.recursiveGet )
, ( "with List.all", Array.Extra.All.withListAll )
, ( "with fold", Array.Extra.All.withFold )
]
, let
allFalse =
Array.repeat 100 False
in
rank "any"
(\any -> allFalse |> any identity)
[ ( "recursive last", Array.Extra.Any.recursiveLast )
, ( "recursive get", Array.Extra.Any.recursiveGet )
, ( "with List.any", Array.Extra.Any.withList )
, ( "with fold", Array.Extra.Any.withFold )
]
, rank "intersperse"
(\intersperse -> ints1To100 |> intersperse 0)
[ ( "with push", Array.Extra.Intersperse.withPush )
, ( "with cons", Array.Extra.Intersperse.withCons )
, ( "with List.intersperse", Array.Extra.Intersperse.withListIntersperse )
]
, rank "member"
(\member -> member 50 ints1To100)
[ ( "with fold", Array.Extra.Member.withFold )
, ( "recursive", Array.Extra.Member.recursive )
, ( "with List.member", Array.Extra.Member.withList )
, ( "with any", Array.Extra.Member.withAny )
]
]
listExtra : Benchmark
listExtra =
let
shortList =
List.range 1 10
intList =
List.range 1 100
longList =
List.range 1 1000
in
describe "List.Extra"
([ rank "uniquePairs"
(\uniquePairs -> uniquePairs intList)
[ ( "original (++)", List.Extra.UniquePairs.originalConcat )
, ( "tail-recursive", List.Extra.UniquePairs.tailRecursive )
]
, rank "unfoldr"
(\unfoldr -> unfoldr subtractOneUntilZero 100)
[ ( "original", List.Extra.Unfoldr.nonTailRecursive )
, ( "tail-recursive", List.Extra.Unfoldr.tailRecursive )
]
, rank "lift2"
(\lift2 -> lift2 (\a b -> a + b) shortList shortList)
[ ( "original", List.Extra.Lift.liftAndThen2 )
, ( "foldl", List.Extra.Lift.liftFold2 )
]
, rank "lift3"
(\lift3 -> lift3 (\a b c -> a + b + c) shortList shortList shortList)
[ ( "original", List.Extra.Lift.liftAndThen3 )
, ( "foldl", List.Extra.Lift.liftFold3 )
]
, rank "lift4"
(\lift4 -> lift4 (\a b c d -> a + b + c + d) shortList shortList shortList shortList)
[ ( "original", List.Extra.Lift.liftAndThen4 )
, ( "foldl", List.Extra.Lift.liftFold4 )
]
, rank "notMember 1"
(\notMember -> notMember 1 intList)
[ ( "Original", List.Extra.NotMember.notMemberOriginal )
, ( "Simplified", List.Extra.NotMember.notMemberSimple )
]
, rank "notMember 99"
(\notMember -> notMember 99 intList)
[ ( "Original", List.Extra.NotMember.notMemberOriginal )
, ( "Simplified", List.Extra.NotMember.notMemberSimple )
]
, rank "notMember 101"
(\notMember -> notMember 101 intList)
[ ( "Original", List.Extra.NotMember.notMemberOriginal )
, ( "Simplified", List.Extra.NotMember.notMemberSimple )
]
, rank "dropRight 5 10"
(\dropRight -> dropRight 5 shortList)
[ ( "foldr", List.Extra.DropRight.dropRightFoldr )
, ( "reverse", List.Extra.DropRight.dropRightReverse )
, ( "length", List.Extra.DropRight.dropRightLength )
]
, rank "takeRight 5 10"
(\takeRight -> takeRight 5 shortList)
[ ( "foldr", List.Extra.TakeRight.takeRightFoldr )
, ( "reverse", List.Extra.TakeRight.takeRightReverse )
, ( "length", List.Extra.TakeRight.takeRightLength )
]
, rank "dropRight 50 100"
(\dropRight -> dropRight 50 intList)
[ ( "foldr", List.Extra.DropRight.dropRightFoldr )
, ( "reverse", List.Extra.DropRight.dropRightReverse )
, ( "length", List.Extra.DropRight.dropRightLength )
]
, rank "takeRight 50 100"
(\takeRight -> takeRight 50 intList)
[ ( "foldr", List.Extra.TakeRight.takeRightFoldr )
, ( "reverse", List.Extra.TakeRight.takeRightReverse )
, ( "length", List.Extra.TakeRight.takeRightLength )
]
, rank "dropRight 500 1000"
(\dropRight -> dropRight 500 longList)
[ ( "foldr", List.Extra.DropRight.dropRightFoldr )
, ( "reverse", List.Extra.DropRight.dropRightReverse )
, ( "length", List.Extra.DropRight.dropRightLength )
]
, rank "takeRight 500 1000"
(\takeRight -> takeRight 500 longList)
[ ( "foldr", List.Extra.TakeRight.takeRightFoldr )
, ( "reverse", List.Extra.TakeRight.takeRightReverse )
, ( "length", List.Extra.TakeRight.takeRightLength )
]
, rank "insertAt negative index"
(\insertAt -> insertAt -3 999 intList)
[ ( "recursion", List.Extra.InsertAt.insertAtRecursion )
, ( "takeDrop", List.Extra.InsertAt.insertAtTakeDrop )
, ( "splitAt", List.Extra.InsertAt.insertAtSplitAt )
, ( "recursion2", List.Extra.InsertAt.insertAtRecursion2 )
, ( "recursion3", List.Extra.InsertAt.insertAtRecursion3 )
]
, rank "insertAt good positive index"
(\insertAt -> insertAt 50 999 intList)
[ ( "recursion", List.Extra.InsertAt.insertAtRecursion )
, ( "takeDrop", List.Extra.InsertAt.insertAtTakeDrop )
, ( "splitAt", List.Extra.InsertAt.insertAtSplitAt )
, ( "recursion2", List.Extra.InsertAt.insertAtRecursion2 )
, ( "recursion3", List.Extra.InsertAt.insertAtRecursion3 )
]
, rank "insertAt bad positive index"
(\insertAt -> insertAt 150 999 intList)
[ ( "recursion", List.Extra.InsertAt.insertAtRecursion )
, ( "takeDrop", List.Extra.InsertAt.insertAtTakeDrop )
, ( "splitAt", List.Extra.InsertAt.insertAtSplitAt )
, ( "recursion2", List.Extra.InsertAt.insertAtRecursion2 )
, ( "recursion3", List.Extra.InsertAt.insertAtRecursion3 )
]
]
++ List.concatMap toComparisonsGroupsOfWithStep (List.range 1 4)
)
toComparisonsGroupsOfWithStep : Int -> List Benchmark
toComparisonsGroupsOfWithStep exponent =
let
listSize =
10 ^ exponent
range =
List.range 1 listSize
in
[ rank ("groupsOfWithStep 3 2 [1.." ++ String.fromInt listSize ++ "]")
(\impl -> impl 3 2 range)
[ ( "using elm-core's List.tail", List.Extra.GroupsOf.coreTailGroupsOfWithStep )
, ( "using fully tail-recursive List.tail", List.Extra.GroupsOf.tailRecGroupsOfWithStep )
]
, rank ("greedyGroupsOfWithStep 3 2 [1.." ++ String.fromInt listSize ++ "]")
(\impl -> impl 3 2 range)
[ ( "using elm-core's List.tail", List.Extra.GroupsOf.coreTailGreedyGroupsOfWithStep )
, ( "using fully tail-recursive List.tail", List.Extra.GroupsOf.tailRecGreedyGroupsOfWithStep )
]
]
tupleExtra : Benchmark
tupleExtra =
describe "Tuple.Extra"
[ Benchmark.compare "construction" "literal" (\() -> ( 1, "a" )) "function" (\() -> Tuple.pair 1 "a")
]
stringExtra : Benchmark
stringExtra =
describe "String.Extra"
[ stringExtraIsBlank
, describe "String.Extra.{rightOf,leftOf}"
[ describe "1 match" (rightLeft 1)
, describe "10 matches" (rightLeft 10)
, describe "100 matches" (rightLeft 100)
, describe "1000 matches" (rightLeft 1000)
]
]
rightLeft matches =
let
a =
List.Extra.initialize matches String.fromInt
|> String.join "___"
in
[ rank "rightOf"
(\rightOf -> rightOf "___" a)
[ ( "regex", String.Extra.RightOfLeftOf.rightOfRegex )
, ( "String.indexes", String.Extra.RightOfLeftOf.rightOfIndexes )
]
, rank "leftOf"
(\leftOf -> leftOf "___" a)
[ ( "regex", String.Extra.RightOfLeftOf.leftOfRegex )
, ( "String.indexes", String.Extra.RightOfLeftOf.leftOfIndexes )
]
]
maybeExtra : Benchmark
maybeExtra =
describe "Maybe.Extra"
[ rank "andMap - Just × Just"
(\andMap -> Just negate |> andMap (Just 0))
[ ( "original", Maybe.Extra.AndMap.andMapOriginal )
, ( "inlined", Maybe.Extra.AndMap.andMapInlined )
, ( "simplified", Maybe.Extra.AndMap.andMapSimplified )
, ( "nested case-of", Maybe.Extra.AndMap.andMapNestedCaseOf )
, ( "nested case-of ignoring Nothing", Maybe.Extra.AndMap.andMapNestedCaseOfIgnoringNothing )
]
, rank "andMap - Nothing × Just"
(\andMap -> Nothing |> andMap (Just 0))
[ ( "original", Maybe.Extra.AndMap.andMapOriginal )
, ( "inlined", Maybe.Extra.AndMap.andMapInlined )
, ( "simplified", Maybe.Extra.AndMap.andMapSimplified )
, ( "nested case-of", Maybe.Extra.AndMap.andMapNestedCaseOf )
, ( "nested case-of ignoring Nothing", Maybe.Extra.AndMap.andMapNestedCaseOfIgnoringNothing )
]
, rank "andMap - Just × Nothing"
(\andMap -> Just negate |> andMap Nothing)
[ ( "original", Maybe.Extra.AndMap.andMapOriginal )
, ( "inlined", Maybe.Extra.AndMap.andMapInlined )
, ( "simplified", Maybe.Extra.AndMap.andMapSimplified )
, ( "nested case-of", Maybe.Extra.AndMap.andMapNestedCaseOf )
, ( "nested case-of ignoring Nothing", Maybe.Extra.AndMap.andMapNestedCaseOfIgnoringNothing )
]
, rank "andMap - Nothing × Nothing"
(\andMap -> Nothing |> andMap Nothing)
[ ( "original", Maybe.Extra.AndMap.andMapOriginal )
, ( "inlined", Maybe.Extra.AndMap.andMapInlined )
, ( "simplified", Maybe.Extra.AndMap.andMapSimplified )
, ( "nested case-of", Maybe.Extra.AndMap.andMapNestedCaseOf )
, ( "nested case-of ignoring Nothing", Maybe.Extra.AndMap.andMapNestedCaseOfIgnoringNothing )
]
]
resultExtra : Benchmark
resultExtra =
let
integers =
List.range 0 100
foldFnAllOk a sum =
if sum < 0 then
Err ()
else
Ok (a + sum)
foldFnFirstError a sum =
if sum <= 0 then
Err ()
else
Ok (a + sum)
in
describe "Result.Extra"
[ rank "andMap - Ok × Ok"
(\andMap -> Ok negate |> andMap (Ok 0))
[ ( "original", Result.Extra.AndMap.andMapOriginal )
, ( "inlined", Result.Extra.AndMap.andMapInlined )
, ( "inlined, nested case-of", Result.Extra.AndMap.andMapInlinedNestedCaseOf )
]
, rank "andMap - Err × Ok"
(\andMap -> Err "e" |> andMap (Ok 0))
[ ( "original", Result.Extra.AndMap.andMapOriginal )
, ( "inlined", Result.Extra.AndMap.andMapInlined )
, ( "inlined, nested case-of", Result.Extra.AndMap.andMapInlinedNestedCaseOf )
]
, rank "andMap - Ok × Err"
(\andMap -> Ok negate |> andMap (Err "e"))
[ ( "original", Result.Extra.AndMap.andMapOriginal )
, ( "inlined", Result.Extra.AndMap.andMapInlined )
, ( "inlined, nested case-of", Result.Extra.AndMap.andMapInlinedNestedCaseOf )
]
, rank "andMap - Err × Err"
(\andMap -> Err "b" |> andMap (Err "e"))
[ ( "original", Result.Extra.AndMap.andMapOriginal )
, ( "inlined", Result.Extra.AndMap.andMapInlined )
, ( "inlined, nested case-of", Result.Extra.AndMap.andMapInlinedNestedCaseOf )
]
, rank "andMap - Err × Err"
(\andMap -> Err "l" |> andMap (Err "e"))
[ ( "original", Result.Extra.AndMap.andMapOriginal )
, ( "inlined", Result.Extra.AndMap.andMapInlined )
]
, rank "foldlWhileOk - Err at the first element"
(\foldlWhileOk -> foldlWhileOk foldFnFirstError 0 integers)
[ ( "Using List.foldl", \f initial list -> List.foldl (\n acc -> Result.andThen (f n) acc) (Ok initial) list )
, ( "foldlWhileOk", \f initial list -> Result.Extra.foldlWhileOk f initial list )
]
, rank "foldlWhileOk - all Ok"
(\foldlWhileOk -> foldlWhileOk foldFnAllOk 0 integers)
[ ( "Using List.foldl", \f initial list -> List.foldl (\n acc -> Result.andThen (f n) acc) (Ok initial) list )
, ( "foldlWhileOk", \f initial list -> Result.Extra.foldlWhileOk f initial list )
]
]
stringExtraIsBlank : Benchmark
stringExtraIsBlank =
let
bench label string =
rank label
(\isBlank -> isBlank string)
[ ( "regex based", String.Extra.IsBlank.regexBased )
, ( "regex based (with top-level regex)", String.Extra.IsBlank.regexBasedWithTopLevelRegex )
, ( "trim based", String.Extra.IsBlank.trimBased )
]
emptyString =
""
wsString =
String.repeat 10 " "
fullString =
String.repeat 10 "Hello World"
in
Benchmark.describe "isBlank"
[ bench "empty string" emptyString
, bench "whitespace string" wsString
, bench "full string" fullString
]
subtractOneUntilZero : Int -> Maybe ( Int, Int )
subtractOneUntilZero i =
if i /= 0 then
Just ( i, i - 1 )
else
Nothing
ints1To100 : Array Int
ints1To100 =
Array.fromList (List.range 1 100)
-- Note for benchmarking:
-- Since sets are ordered internally, you can get seriously distorted numbers
-- if the sets happen to intersect and start/end, or are disjoint with no overlap
-- in their ranges.
--
-- Hence the following sample data is carefully chosen such that even disjoint
-- sets are for instance even/odd numbers.
--
-- That said, in my experience specific benchmark results can be highly dependant
-- on exact choice of example data, so if you are getting particularly interesting
-- results, play around with different data distributions.
evenNumberSet : Set Int
evenNumberSet =
Set.fromList (List.range 50 1000 |> List.filter (\x -> modBy 2 x == 0))
oddNumberSetPlus500 : Set Int
oddNumberSetPlus500 =
oddNumberSet
|> Set.insert 500
oddNumberSet : Set Int
oddNumberSet =
Set.fromList (List.range 1 950 |> List.filter (\x -> modBy 2 x == 1))
lowNumsAndDivisibleBy4Set : Set Int
lowNumsAndDivisibleBy4Set =
Set.fromList (List.range 1 1000 |> List.filter (\x -> modBy 4 x == 0))
|> Set.union (Set.fromList (List.range 1 250))
divisibleBy3and5Set : Set Int
divisibleBy3and5Set =
Set.fromList (List.range 1 1000 |> List.filter (\x -> modBy 3 x == 0))
|> Set.union (Set.fromList (List.range 1 1000 |> List.filter (\x -> modBy 5 x == 0)))
setExtra : Benchmark
setExtra =
describe "Set.Extra"
[ rank "areDisjoint == True"
(\areDisjoint -> areDisjoint evenNumberSet oddNumberSet)
[ ( "intersection", Set.Extra.AreDisjoint.intersection )
, ( "listRecursion", Set.Extra.AreDisjoint.listRecursion )
, ( "foldr", Set.Extra.AreDisjoint.foldr )
, ( "foldl", Set.Extra.AreDisjoint.foldl )
]
, rank "areDisjoint == False (and small)"
(\areDisjoint -> areDisjoint evenNumberSet oddNumberSetPlus500)
[ ( "intersection", Set.Extra.AreDisjoint.intersection )
, ( "listRecursion", Set.Extra.AreDisjoint.listRecursion )
, ( "foldr", Set.Extra.AreDisjoint.foldr )
, ( "foldl", Set.Extra.AreDisjoint.foldl )
]
, rank "areDisjoint == False (and large)"
(\areDisjoint -> areDisjoint evenNumberSet lowNumsAndDivisibleBy4Set)
[ ( "intersection", Set.Extra.AreDisjoint.intersection )
, ( "listRecursion", Set.Extra.AreDisjoint.listRecursion )
, ( "foldr", Set.Extra.AreDisjoint.foldr )
, ( "foldl", Set.Extra.AreDisjoint.foldl )
]
, rank "symmetricDifference"
(\areDisjoint -> areDisjoint evenNumberSet divisibleBy3and5Set)
[ ( "naive", Set.Extra.SymmetricDifference.naive )
, ( "orderExploiting", Set.Extra.SymmetricDifference.orderExploiting )
]
]