Skip to content

Instantly share code, notes, and snippets.

@Rokt33r
Last active August 19, 2017 14:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Rokt33r/9c5aa409dd6976f5df8e6a061765d9ed to your computer and use it in GitHub Desktop.
Map performance comparison
Get Nth
Native Object(10) : 22670660.07 +/- 2.14% op/s
Native Map(10) : 22534378.75 +/- 0.93% op/s
Hashtrie(10) : 13052298.01 +/- 0.99% op/s
Hamt(10) : 13362491.37 +/- 0.78% op/s
Hamt+(10) : 13020559.46 +/- 0.73% op/s
Mori(10) : 9405100.99 +/- 2.80% op/s
Immutable(10) : 12250139.06 +/- 2.92% op/s
Native Object(100) : 31386478.91 +/- 1.57% op/s
Native Map(100) : 17021320.51 +/- 1.36% op/s
Hashtrie(100) : 9478308.61 +/- 1.44% op/s
Hamt(100) : 9528080.64 +/- 1.87% op/s
Hamt+(100) : 8419948.52 +/- 2.71% op/s
Mori(100) : 7611028.65 +/- 3.02% op/s
Immutable(100) : 8962525.58 +/- 1.21% op/s
Native Object(1000) : 25034518.77 +/- 0.96% op/s
Native Map(1000) : 13170124.92 +/- 1.93% op/s
Hashtrie(1000) : 6871356.36 +/- 2.16% op/s
Hamt(1000) : 7826412.57 +/- 1.45% op/s
Hamt+(1000) : 6646961.57 +/- 4.25% op/s
Mori(1000) : 2157278.56 +/- 1.57% op/s
Immutable(1000) : 6190013.09 +/- 1.86% op/s
Native Object(10000) : 14736578.47 +/- 2.70% op/s
Native Map(10000) : 9011440.55 +/- 2.07% op/s
Hashtrie(10000) : 3845349.45 +/- 9.14% op/s
Hamt(10000) : 6013927.40 +/- 0.65% op/s
Hamt+(10000) : 5385086.33 +/- 6.57% op/s
Mori(10000) : 1426509.21 +/- 15.15% op/s
Immutable(10000) : 4430999.51 +/- 5.34% op/s
Native Object(100000) : 5423346.14 +/- 1.72% op/s
Native Map(100000) : 3976192.04 +/- 1.78% op/s
Hashtrie(100000) : 955922.87 +/- 3.23% op/s
Hamt(100000) : 1265251.83 +/- 1.21% op/s
Hamt+(100000) : 1274622.63 +/- 3.01% op/s
Mori(100000) : 883699.51 +/- 7.30% op/s
Immutable(100000) : 1005013.64 +/- 1.34% op/s
^[[CPut Nth
Native Object(10) : 629806.76 +/- 0.63% op/s
Native Map(10) : 771868.21 +/- 0.85% op/s
Hashtrie(10) : 2987574.17 +/- 0.78% op/s
Hamt(10) : 3039888.70 +/- 16.74% op/s
Hamt+(10) : 2709325.83 +/- 17.14% op/s
Mori(10) : 5012979.27 +/- 1.90% op/s
Immutable(10) : 3320646.65 +/- 17.91% op/s
Native Object(100) : 23107.27 +/- 1.65% op/s
Native Map(100) : 74247.29 +/- 1.38% op/s
Hashtrie(100) : 2205675.13 +/- 2.08% op/s
Hamt(100) : 1868012.24 +/- 21.09% op/s
Hamt+(100) : 1868946.40 +/- 16.79% op/s
Mori(100) : 3651826.77 +/- 0.72% op/s
Immutable(100) : 2571894.56 +/- 7.22% op/s
Native Object(1000) : 2159.17 +/- 1.09% op/s
Native Map(1000) : 7871.13 +/- 0.84% op/s
Hashtrie(1000) : 1929501.60 +/- 0.86% op/s
Hamt(1000) : 1668953.79 +/- 10.27% op/s
Hamt+(1000) : 1448257.11 +/- 19.78% op/s
Mori(1000) : 2167345.55 +/- 1.20% op/s
Immutable(1000) : 1673263.13 +/- 10.61% op/s
Native Object(10000) : 171.30 +/- 2.20% op/s
Native Map(10000) : 550.63 +/- 1.54% op/s
Hashtrie(10000) : 1283726.09 +/- 1.26% op/s
Hamt(10000) : 1309217.73 +/- 11.30% op/s
Hamt+(10000) : 1189601.66 +/- 11.49% op/s
Mori(10000) : 1722988.94 +/- 2.18% op/s
Immutable(10000) : 1186472.32 +/- 1.63% op/s
Native Object(100000) : 7.99 +/- 11.17% op/s
Native Map(100000) : 31.48 +/- 12.51% op/s
Hashtrie(100000) : 1361697.13 +/- 2.24% op/s
Hamt(100000) : 1122808.65 +/- 8.23% op/s
Hamt+(100000) : 1235138.41 +/- 6.00% op/s
Mori(100000) : 2030121.36 +/- 0.91% op/s
Immutable(100000) : 1187130.58 +/- 9.29% op/s
Put N
Native Object(10) : 138215.37 +/- 1.06% op/s
Native Map(10) : 136657.21 +/- 1.66% op/s
Hashtrie(10) : 317973.47 +/- 1.74% op/s
Hamt(10) : 335641.93 +/- 12.45% op/s
Hamt+(10) : 338677.78 +/- 11.51% op/s
Mori(10) : 327401.47 +/- 0.89% op/s
Immutable(10) : 250230.53 +/- 11.55% op/s
Native Object(100) : 431.10 +/- 3.49% op/s
Native Map(100) : 1467.12 +/- 2.94% op/s
Hashtrie(100) : 24827.16 +/- 1.44% op/s
Hamt(100) : 21346.19 +/- 11.02% op/s
Hamt+(100) : 21334.16 +/- 10.02% op/s
Mori(100) : 26940.08 +/- 2.05% op/s
Immutable(100) : 24455.05 +/- 11.23% op/s
Native Object(1000) : 4.24 +/- 3.62% op/s
Native Map(1000) : 16.98 +/- 2.21% op/s
Hashtrie(1000) : 1995.61 +/- 2.34% op/s
Hamt(1000) : 1757.05 +/- 8.17% op/s
Hamt+(1000) : 1640.88 +/- 7.90% op/s
Mori(1000) : 1246.01 +/- 2.85% op/s
Immutable(1000) : 1941.81 +/- 10.22% op/s
Native Object(10000) : 0.03 +/- 3.56% op/s
Native Map(10000) : 0.13 +/- 1.75% op/s
Hashtrie(10000) : 115.23 +/- 4.23% op/s
Hamt(10000) : 119.28 +/- 7.94% op/s
Hamt+(10000) : 130.52 +/- 9.59% op/s
Mori(10000) : 103.67 +/- 0.66% op/s
Immutable(10000) : 125.40 +/- 9.45% op/s
Put N (transient)
Native Object(10) : 4319367.56 +/- 1.27% op/s
Native Map(10) : 1284743.98 +/- 0.85% op/s
Hamt(10) : 373473.04 +/- 13.25% op/s
Hamt+(10) : 319300.77 +/- 11.30% op/s
Mori(10) : 236182.31 +/- 0.76% op/s
Immutable(10) : 283281.92 +/- 11.13% op/s
Native Object(100) : 102900.82 +/- 2.65% op/s
Native Map(100) : 150655.74 +/- 2.95% op/s
Hamt(100) : 27533.34 +/- 10.81% op/s
Hamt+(100) : 25688.66 +/- 16.83% op/s
Mori(100) : 5195.09 +/- 2.30% op/s
Immutable(100) : 34626.99 +/- 13.38% op/s
Native Object(1000) : 10243.78 +/- 1.52% op/s
Native Map(1000) : 14440.14 +/- 0.53% op/s
Hamt(1000) : 2044.91 +/- 11.08% op/s
Hamt+(1000) : 2682.95 +/- 10.89% op/s
Mori(1000) : 417.64 +/- 3.39% op/s
Immutable(1000) : 3136.99 +/- 10.26% op/s
Native Object(10000) : 1065.13 +/- 1.82% op/s
Native Map(10000) : 997.80 +/- 1.57% op/s
Hamt(10000) : 159.05 +/- 9.70% op/s
Hamt+(10000) : 223.91 +/- 14.01% op/s
Mori(10000) : 48.52 +/- 1.73% op/s
Immutable(10000) : 274.43 +/- 8.59% op/s
Remove Nth
Native Object(10) : 354062.73 +/- 3.04% op/s
Native Map(10) : 604658.45 +/- 1.35% op/s
Hashtrie(10) : 3343267.63 +/- 1.17% op/s
Hamt(10) : 3964403.01 +/- 2.25% op/s
Hamt+(10) : 3512469.00 +/- 12.54% op/s
Mori(10) : 3257445.00 +/- 0.89% op/s
Immutable(10) : 3435122.85 +/- 12.16% op/s
Native Object(100) : 22486.62 +/- 1.10% op/s
Native Map(100) : 73683.33 +/- 2.57% op/s
Hashtrie(100) : 2113503.03 +/- 12.59% op/s
Hamt(100) : 2286475.69 +/- 4.88% op/s
Hamt+(100) : 2218605.18 +/- 2.46% op/s
Mori(100) : 2566770.52 +/- 13.35% op/s
Immutable(100) : 2341402.59 +/- 1.39% op/s
Native Object(1000) : 1963.50 +/- 2.11% op/s
Native Map(1000) : 7378.79 +/- 13.09% op/s
Hashtrie(1000) : 1717525.74 +/- 0.96% op/s
Hamt(1000) : 1771342.92 +/- 1.10% op/s
Hamt+(1000) : 1553675.59 +/- 12.68% op/s
Mori(1000) : 1007669.62 +/- 15.13% op/s
Immutable(1000) : 1670199.52 +/- 1.85% op/s
Native Object(10000) : 169.94 +/- 1.61% op/s
Native Map(10000) : 572.66 +/- 12.86% op/s
Hashtrie(10000) : 943002.60 +/- 5.09% op/s
Hamt(10000) : 1071546.76 +/- 5.22% op/s
Hamt+(10000) : 842084.19 +/- 21.76% op/s
Mori(10000) : 800079.86 +/- 16.88% op/s
Immutable(10000) : 1171090.77 +/- 1.33% op/s
Native Object(100000) : 8.14 +/- 7.70% op/s
Native Map(100000) : 29.43 +/- 15.37% op/s
Hashtrie(100000) : 532401.40 +/- 1.86% op/s
Hamt(100000) : 611962.02 +/- 0.93% op/s
Hamt+(100000) : 571820.33 +/- 1.39% op/s
Mori(100000) : 592643.36 +/- 0.78% op/s
Immutable(100000) : 537289.42 +/- 1.16% op/s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment