Maps
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 | get | put | remove (absent) | remove (present) |
---|---|---|---|---|
Built Map | 0.22 | 2.50 | 1.67 | 1.84 |
Dart Map | 0.22 | 0.41 | 0.15 | 0.22 |
Dartz IMap | 0.62 | 2.59 | 1.76 | 1.79 |
FIC IMap | 0.31 | 34.22 | 0.31 | 15.00 |
Kt Map | 0.23 | 16.25 | 10.50 | 10.57 |
Ribs IMap | 2.23 | 9.05 | 0.32 | 8.16 |
Ribs MMap | 2.59 | 0.57 | 0.81 | 0.82 |
N = 100 | get | put | remove (absent) | remove (present) |
---|---|---|---|---|
Built Map | 0.23 | 9.35 | 7.84 | 7.89 |
Dart Map | 0.23 | 0.42 | 0.15 | 0.19 |
Dartz IMap | 1.07 | 4.05 | 3.05 | 2.69 |
FIC IMap | 0.31 | 277.03 | 0.29 | 122.22 |
Kt Map | 0.23 | 91.28 | 83.12 | 83.52 |
Ribs IMap | 3.01 | 2.15 | 1.30 | 0.92 |
Ribs MMap | 2.66 | 0.69 | 0.81 | 0.87 |
N = 1000 | get | put | remove (absent) | remove (present) |
---|---|---|---|---|
Built Map | 0.23 | 60.34 | 55.54 | 55.65 |
Dart Map | 0.23 | 0.41 | 0.15 | 0.23 |
Dartz IMap | 1.45 | 5.42 | 4.10 | 4.12 |
FIC IMap | 0.32 | 2439.71 | 0.29 | 1121.52 |
Kt Map | 0.24 | 762.19 | 724.01 | 721.62 |
Ribs IMap | 2.90 | 32.85 | 1.06 | 0.92 |
Ribs MMap | 2.70 | 0.74 | 0.90 | 1.02 |
N = 10000 | get | put | remove (absent) | remove (present) |
---|---|---|---|---|
Built Map | 0.22 | 5198.85 | 5145.82 | 5087.75 |
Dart Map | 0.22 | 0.41 | 0.15 | 0.19 |
Dartz IMap | 1.71 | 7.18 | 5.91 | 4.97 |
FIC IMap | 0.31 | 31593.23 | 0.30 | 19872.02 |
Kt Map | 0.27 | 14580.49 | 14910.62 | 14807.04 |
Ribs IMap | 2.83 | 31.31 | 1.08 | 32.54 |
Ribs MMap | 2.64 | 0.72 | 0.82 | 0.88 |
N = 100000 | get | put | remove (absent) | remove (present) |
---|---|---|---|---|
Built Map | 0.23 | 49211.75 | 51947.38 | 56167.00 |
Dart Map | 0.22 | 0.41 | 0.15 | 0.20 |
Dartz IMap | 2.09 | 8.96 | 7.40 | 7.37 |
FIC IMap | 0.31 | 842721.00 | 0.30 | 359387.00 |
Kt Map | 0.25 | 189758.27 | 183993.47 | 196335.18 |
Ribs IMap | 3.68 | 40.23 | 1.48 | 1.79 |
Ribs MMap | 2.71 | 0.75 | 0.88 | 0.90 |
N = 1000000 | get | put | remove (absent) | remove (present) |
---|---|---|---|---|
Built Map | 0.23 | 469084.00 | 495536.80 | 500564.00 |
Dart Map | 0.22 | 0.41 | 0.15 | 0.19 |
Dartz IMap | 2.41 | 10.70 | 8.79 | 8.89 |
FIC IMap | 0.31 | 10259931.50 | 0.29 | 4592665.00 |
Kt Map | 0.23 | 2334132.00 | 2469921.50 | 2452939.00 |
Ribs IMap | 3.55 | 51.00 | 1.84 | 1.65 |
Ribs MMap | 2.66 | 0.77 | 0.86 | 0.89 |