Sets
caution
These benchmarks should not be used as a definitive answer to which collections are best. It's typical for different implementations to perform better for specific use cases. You are strongly encouraged to verify any results.
Also bear in mind that these numbers are in microseconds.
N = 10 | add | addAll (different) | addAll (same) | contains | remove |
---|---|---|---|---|---|
Dart Set | 0.22 | 3.36 | 2.99 | 0.32 | 0.23 |
Dartz Set | 2.34 | 25.57 | 12.81 | 0.79 | 1.79 |
FIC ISet | 0.46 | 14.16 | 5.52 | 0.43 | 6.81 |
Ribs ISet | 7.74 | 16.52 | 0.49 | 0.56 | 7.27 |
Ribs MSet | 0.26 | 3.34 | 3.06 | 0.46 | 0.23 |
N = 100 | add | addAll (different) | addAll (same) | contains | remove |
---|---|---|---|---|---|
Dart Set | 0.21 | 32.19 | 24.47 | 0.32 | 0.18 |
Dartz Set | 3.47 | 419.93 | 266.39 | 1.16 | 2.60 |
FIC ISet | 0.45 | 142.47 | 28.48 | 0.43 | 47.22 |
Ribs ISet | 1.61 | 246.64 | 0.49 | 1.14 | 0.85 |
Ribs MSet | 0.26 | 35.14 | 35.23 | 0.45 | 0.23 |
N = 1000 | add | addAll (different) | addAll (same) | contains | remove |
---|---|---|---|---|---|
Dart Set | 0.21 | 359.39 | 236.85 | 0.31 | 0.22 |
Dartz Set | 4.54 | 5445.82 | 3904.19 | 1.45 | 3.66 |
FIC ISet | 0.46 | 1282.51 | 269.65 | 0.42 | 392.05 |
Ribs ISet | 1.22 | 2294.61 | 0.48 | 1.12 | 0.86 |
Ribs MSet | 0.28 | 447.29 | 383.99 | 0.50 | 0.24 |
N = 10000 | add | addAll (different) | addAll (same) | contains | remove |
---|---|---|---|---|---|
Dart Set | 0.21 | 2895.47 | 2384.16 | 0.31 | 0.18 |
Dartz Set | 6.12 | 71305.97 | 52743.82 | 1.71 | 4.69 |
FIC ISet | 0.45 | 14703.83 | 2689.55 | 0.42 | 5321.72 |
Ribs ISet | 1.23 | 24720.56 | 0.49 | 1.12 | 1.06 |
Ribs MSet | 0.26 | 5274.93 | 3806.19 | 0.45 | 0.24 |
N = 100000 | add | addAll (different) | addAll (same) | contains | remove |
---|---|---|---|---|---|
Dart Set | 0.23 | 43079.06 | 27273.68 | 0.32 | 0.18 |
Dartz Set | 7.61 | 1066987.50 | 802796.00 | 2.07 | 7.20 |
FIC ISet | 0.45 | 458190.20 | 54272.68 | 0.43 | 103934.64 |
Ribs ISet | 1.64 | 355395.50 | 0.49 | 1.75 | 1.61 |
Ribs MSet | 0.26 | 79470.23 | 50065.31 | 0.45 | 0.23 |
N = 1000000 | add | addAll (different) | addAll (same) | contains | remove |
---|---|---|---|---|---|
Dart Set | 0.22 | 900809.00 | 461075.40 | 0.33 | 0.18 |
Dartz Set | 8.98 | 12626918.50 | 10597567.50 | 2.40 | 8.29 |
FIC ISet | 0.45 | 5994375.50 | 1597626.00 | 0.43 | 1454784.50 |
Ribs ISet | 2.01 | 3651381.50 | 0.49 | 1.74 | 1.61 |
Ribs MSet | 0.27 | 1362908.50 | 773740.00 | 0.46 | 0.25 |