Benchmark Report

red-black-tree

Test CaseLatency Avg (ms)Min (ms)Max (ms)Stability
1,000,000 set508.80407.39735.02±16.47%
1,000,000 get3.602.5910.73±12.76%
1,000,000 iterator181.28131.67399.35±21.13%
Competitor 1,000,000 set657.36646.08668.05±0.94%
Competitor 1,000,000 get707.92661.39774.77±4.43%

queue

Test CaseLatency Avg (ms)Min (ms)Max (ms)Stability
1,000,000 push26.8321.2667.52±7.94%
100,000 push & shift2.712.403.56±1.99%
Native JS Array 100,000 push & shift1214.601060.421423.06±10.02%

deque

Test CaseLatency Avg (ms)Min (ms)Max (ms)Stability
1,000,000 push8.858.489.64±0.50%
1,000,000 push & pop13.5213.0214.76±0.54%
1,000,000 push & shift14.0813.6215.34±0.51%
100,000 push & shift1.351.311.44±0.33%
Native JS Array 100,000 push & shift1429.15944.171975.05±26.96%
100,000 unshift & shift1.291.251.54±0.68%
Native JS Array 100,000 unshift & shift2200.251844.732839.30±17.78%

heap

Test CaseLatency Avg (ms)Min (ms)Max (ms)Stability
100,000 add4.704.365.15±0.81%
100,000 add & poll17.3116.6518.67±0.57%

avl-tree

Test CaseLatency Avg (ms)Min (ms)Max (ms)Stability
100,000 set randomly354.58320.37396.77±5.90%
100,000 set310.29294.79362.25±4.57%
100,000 get0.260.250.29±0.44%
100,000 getNode199.21170.37228.69±4.40%
100,000 iterator15.4113.3929.67±4.05%
100,000 set & delete orderly436.63426.38457.78±1.52%
100,000 set & delete randomly526.98512.67544.63±1.87%

hash-map

Test CaseLatency Avg (ms)Min (ms)Max (ms)Stability
1,000,000 set40.6833.3559.21±4.69%
Native JS Map 1,000,000 set144.13131.77167.71±3.43%
Native JS Set 1,000,000 add112.65104.13148.36±4.84%
1,000,000 set & get45.4036.8357.24±4.56%
Native JS Map 1,000,000 set & get195.80184.61220.64±3.12%
Native JS Set 1,000,000 add & has159.47148.45196.09±4.13%
1,000,000 ObjKey set & get239.09210.63272.97±5.14%
Native JS Map 1,000,000 ObjKey set & get207.48181.81240.56±5.90%
Native JS Set 1,000,000 ObjKey add & has188.86162.40246.83±8.41%

directed-graph

Test CaseLatency Avg (ms)Min (ms)Max (ms)Stability
1,000 addVertex0.050.040.05±0.37%
1,000 addEdge3.002.785.35±2.48%
1,000 getVertex0.040.040.04±0.52%
1,000 getEdge44.7840.8997.02±5.62%
tarjan241.55235.87269.07±1.82%
topologicalSort200.74197.47219.65±1.30%

trie

Test CaseLatency Avg (ms)Min (ms)Max (ms)Stability
100,000 push27.6625.1337.31±1.98%
100,000 getWords64.6237.66288.42±29.56%

stack

Test CaseLatency Avg (ms)Min (ms)Max (ms)Stability
1,000,000 push26.5722.3633.50±3.44%
1,000,000 push & pop30.3025.1455.18±4.78%