data-structure-typed 1.50.0 → 1.50.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/CHANGELOG.md +2 -1
  2. package/README.md +204 -212
  3. package/benchmark/report.html +37 -1
  4. package/benchmark/report.json +370 -22
  5. package/dist/cjs/data-structures/base/iterable-base.d.ts +114 -9
  6. package/dist/cjs/data-structures/base/iterable-base.js +143 -7
  7. package/dist/cjs/data-structures/base/iterable-base.js.map +1 -1
  8. package/dist/cjs/data-structures/binary-tree/avl-tree.d.ts +43 -46
  9. package/dist/cjs/data-structures/binary-tree/avl-tree.js +68 -71
  10. package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +1 -1
  11. package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +244 -199
  12. package/dist/cjs/data-structures/binary-tree/binary-tree.js +484 -376
  13. package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +1 -1
  14. package/dist/cjs/data-structures/binary-tree/bst.d.ts +54 -74
  15. package/dist/cjs/data-structures/binary-tree/bst.js +30 -71
  16. package/dist/cjs/data-structures/binary-tree/bst.js.map +1 -1
  17. package/dist/cjs/data-structures/binary-tree/rb-tree.d.ts +78 -60
  18. package/dist/cjs/data-structures/binary-tree/rb-tree.js +84 -89
  19. package/dist/cjs/data-structures/binary-tree/rb-tree.js.map +1 -1
  20. package/dist/cjs/data-structures/binary-tree/tree-multimap.d.ts +37 -56
  21. package/dist/cjs/data-structures/binary-tree/tree-multimap.js +64 -85
  22. package/dist/cjs/data-structures/binary-tree/tree-multimap.js.map +1 -1
  23. package/dist/cjs/data-structures/graph/abstract-graph.d.ts +1 -0
  24. package/dist/cjs/data-structures/graph/abstract-graph.js +3 -0
  25. package/dist/cjs/data-structures/graph/abstract-graph.js.map +1 -1
  26. package/dist/cjs/data-structures/graph/directed-graph.d.ts +14 -0
  27. package/dist/cjs/data-structures/graph/directed-graph.js +26 -0
  28. package/dist/cjs/data-structures/graph/directed-graph.js.map +1 -1
  29. package/dist/cjs/data-structures/graph/map-graph.d.ts +8 -0
  30. package/dist/cjs/data-structures/graph/map-graph.js +14 -0
  31. package/dist/cjs/data-structures/graph/map-graph.js.map +1 -1
  32. package/dist/cjs/data-structures/graph/undirected-graph.d.ts +16 -0
  33. package/dist/cjs/data-structures/graph/undirected-graph.js +25 -0
  34. package/dist/cjs/data-structures/graph/undirected-graph.js.map +1 -1
  35. package/dist/cjs/data-structures/hash/hash-map.d.ts +121 -15
  36. package/dist/cjs/data-structures/hash/hash-map.js +160 -25
  37. package/dist/cjs/data-structures/hash/hash-map.js.map +1 -1
  38. package/dist/cjs/data-structures/heap/heap.d.ts +66 -6
  39. package/dist/cjs/data-structures/heap/heap.js +66 -6
  40. package/dist/cjs/data-structures/heap/heap.js.map +1 -1
  41. package/dist/cjs/data-structures/linked-list/doubly-linked-list.d.ts +67 -50
  42. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js +70 -64
  43. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +1 -1
  44. package/dist/cjs/data-structures/linked-list/singly-linked-list.d.ts +128 -103
  45. package/dist/cjs/data-structures/linked-list/singly-linked-list.js +130 -112
  46. package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +1 -1
  47. package/dist/cjs/data-structures/linked-list/skip-linked-list.d.ts +63 -36
  48. package/dist/cjs/data-structures/linked-list/skip-linked-list.js +63 -36
  49. package/dist/cjs/data-structures/linked-list/skip-linked-list.js.map +1 -1
  50. package/dist/cjs/data-structures/matrix/matrix.d.ts +35 -4
  51. package/dist/cjs/data-structures/matrix/matrix.js +50 -11
  52. package/dist/cjs/data-structures/matrix/matrix.js.map +1 -1
  53. package/dist/cjs/data-structures/queue/deque.d.ts +49 -19
  54. package/dist/cjs/data-structures/queue/deque.js +101 -47
  55. package/dist/cjs/data-structures/queue/deque.js.map +1 -1
  56. package/dist/cjs/data-structures/queue/queue.d.ts +39 -5
  57. package/dist/cjs/data-structures/queue/queue.js +47 -5
  58. package/dist/cjs/data-structures/queue/queue.js.map +1 -1
  59. package/dist/cjs/data-structures/stack/stack.d.ts +16 -0
  60. package/dist/cjs/data-structures/stack/stack.js +22 -0
  61. package/dist/cjs/data-structures/stack/stack.js.map +1 -1
  62. package/dist/cjs/data-structures/trie/trie.d.ts +38 -1
  63. package/dist/cjs/data-structures/trie/trie.js +41 -0
  64. package/dist/cjs/data-structures/trie/trie.js.map +1 -1
  65. package/dist/cjs/types/data-structures/binary-tree/binary-tree.d.ts +1 -1
  66. package/dist/cjs/types/data-structures/hash/hash-map.d.ts +4 -3
  67. package/dist/cjs/types/utils/utils.d.ts +1 -0
  68. package/dist/mjs/data-structures/base/iterable-base.d.ts +114 -9
  69. package/dist/mjs/data-structures/base/iterable-base.js +143 -7
  70. package/dist/mjs/data-structures/binary-tree/avl-tree.d.ts +43 -46
  71. package/dist/mjs/data-structures/binary-tree/avl-tree.js +68 -71
  72. package/dist/mjs/data-structures/binary-tree/binary-tree.d.ts +244 -199
  73. package/dist/mjs/data-structures/binary-tree/binary-tree.js +483 -375
  74. package/dist/mjs/data-structures/binary-tree/bst.d.ts +54 -74
  75. package/dist/mjs/data-structures/binary-tree/bst.js +30 -71
  76. package/dist/mjs/data-structures/binary-tree/rb-tree.d.ts +78 -60
  77. package/dist/mjs/data-structures/binary-tree/rb-tree.js +84 -89
  78. package/dist/mjs/data-structures/binary-tree/tree-multimap.d.ts +37 -56
  79. package/dist/mjs/data-structures/binary-tree/tree-multimap.js +64 -85
  80. package/dist/mjs/data-structures/graph/abstract-graph.d.ts +1 -0
  81. package/dist/mjs/data-structures/graph/abstract-graph.js +3 -0
  82. package/dist/mjs/data-structures/graph/directed-graph.d.ts +14 -0
  83. package/dist/mjs/data-structures/graph/directed-graph.js +26 -0
  84. package/dist/mjs/data-structures/graph/map-graph.d.ts +8 -0
  85. package/dist/mjs/data-structures/graph/map-graph.js +14 -0
  86. package/dist/mjs/data-structures/graph/undirected-graph.d.ts +16 -0
  87. package/dist/mjs/data-structures/graph/undirected-graph.js +25 -0
  88. package/dist/mjs/data-structures/hash/hash-map.d.ts +121 -15
  89. package/dist/mjs/data-structures/hash/hash-map.js +160 -25
  90. package/dist/mjs/data-structures/heap/heap.d.ts +66 -6
  91. package/dist/mjs/data-structures/heap/heap.js +66 -6
  92. package/dist/mjs/data-structures/linked-list/doubly-linked-list.d.ts +67 -50
  93. package/dist/mjs/data-structures/linked-list/doubly-linked-list.js +70 -64
  94. package/dist/mjs/data-structures/linked-list/singly-linked-list.d.ts +128 -103
  95. package/dist/mjs/data-structures/linked-list/singly-linked-list.js +130 -112
  96. package/dist/mjs/data-structures/linked-list/skip-linked-list.d.ts +63 -36
  97. package/dist/mjs/data-structures/linked-list/skip-linked-list.js +63 -36
  98. package/dist/mjs/data-structures/matrix/matrix.d.ts +35 -4
  99. package/dist/mjs/data-structures/matrix/matrix.js +50 -11
  100. package/dist/mjs/data-structures/queue/deque.d.ts +49 -19
  101. package/dist/mjs/data-structures/queue/deque.js +101 -47
  102. package/dist/mjs/data-structures/queue/queue.d.ts +39 -5
  103. package/dist/mjs/data-structures/queue/queue.js +47 -5
  104. package/dist/mjs/data-structures/stack/stack.d.ts +16 -0
  105. package/dist/mjs/data-structures/stack/stack.js +22 -0
  106. package/dist/mjs/data-structures/trie/trie.d.ts +38 -1
  107. package/dist/mjs/data-structures/trie/trie.js +41 -0
  108. package/dist/mjs/types/data-structures/binary-tree/binary-tree.d.ts +1 -1
  109. package/dist/mjs/types/data-structures/hash/hash-map.d.ts +4 -3
  110. package/dist/mjs/types/utils/utils.d.ts +1 -0
  111. package/dist/umd/data-structure-typed.js +1730 -1042
  112. package/dist/umd/data-structure-typed.min.js +3 -3
  113. package/dist/umd/data-structure-typed.min.js.map +1 -1
  114. package/package.json +16 -40
  115. package/src/data-structures/base/iterable-base.ts +172 -19
  116. package/src/data-structures/binary-tree/avl-tree.ts +97 -97
  117. package/src/data-structures/binary-tree/binary-tree.ts +674 -671
  118. package/src/data-structures/binary-tree/bst.ts +89 -131
  119. package/src/data-structures/binary-tree/rb-tree.ts +127 -155
  120. package/src/data-structures/binary-tree/tree-multimap.ts +96 -112
  121. package/src/data-structures/graph/abstract-graph.ts +4 -0
  122. package/src/data-structures/graph/directed-graph.ts +30 -0
  123. package/src/data-structures/graph/map-graph.ts +15 -0
  124. package/src/data-structures/graph/undirected-graph.ts +28 -0
  125. package/src/data-structures/hash/hash-map.ts +175 -34
  126. package/src/data-structures/heap/heap.ts +66 -6
  127. package/src/data-structures/linked-list/doubly-linked-list.ts +72 -66
  128. package/src/data-structures/linked-list/singly-linked-list.ts +132 -114
  129. package/src/data-structures/linked-list/skip-linked-list.ts +63 -37
  130. package/src/data-structures/matrix/matrix.ts +52 -12
  131. package/src/data-structures/queue/deque.ts +108 -49
  132. package/src/data-structures/queue/queue.ts +51 -5
  133. package/src/data-structures/stack/stack.ts +24 -0
  134. package/src/data-structures/trie/trie.ts +45 -1
  135. package/src/types/data-structures/binary-tree/binary-tree.ts +1 -1
  136. package/src/types/data-structures/hash/hash-map.ts +4 -3
  137. package/src/types/utils/utils.ts +2 -0
  138. package/test/performance/data-structures/graph/directed-graph.test.ts +3 -3
  139. package/test/performance/data-structures/queue/deque.test.ts +26 -25
  140. package/test/unit/data-structures/binary-tree/avl-tree.test.ts +37 -0
  141. package/test/unit/data-structures/binary-tree/binary-tree.test.ts +46 -17
  142. package/test/unit/data-structures/binary-tree/bst.test.ts +65 -1
  143. package/test/unit/data-structures/binary-tree/rb-tree.test.ts +38 -1
  144. package/test/unit/data-structures/binary-tree/tree-multimap.test.ts +37 -32
  145. package/test/unit/data-structures/graph/abstract-graph.test.ts +8 -0
  146. package/test/unit/data-structures/graph/directed-graph.test.ts +249 -0
  147. package/test/unit/data-structures/hash/hash-map.test.ts +376 -353
  148. package/test/unit/data-structures/heap/heap.test.ts +18 -1
  149. package/test/unit/data-structures/linked-list/doubly-linked-list.test.ts +24 -5
  150. package/test/unit/data-structures/linked-list/singly-linked-list.test.ts +20 -2
  151. package/test/unit/data-structures/linked-list/skip-list.test.ts +1 -1
  152. package/test/unit/data-structures/queue/deque.test.ts +71 -10
  153. package/test/unit/data-structures/queue/queue.test.ts +23 -6
  154. package/test/unit/data-structures/stack/stack.test.ts +17 -0
  155. package/test/unit/data-structures/trie/trie.test.ts +17 -0
  156. package/test/unit/unrestricted-interconversion.test.ts +143 -10
@@ -42,8 +42,44 @@
42
42
  </head>
43
43
  <body>
44
44
  <div id="json-to-html"><div class="json-to-html-collapse clearfix 0">
45
+ <div class='collapsible level0' ><span class='json-to-html-label'>avl-tree</span></div>
46
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>119.60</td><td>8.36</td><td>0.00</td></tr><tr><td>10,000 add & delete randomly</td><td>178.17</td><td>5.61</td><td>0.00</td></tr><tr><td>10,000 addMany</td><td>129.03</td><td>7.75</td><td>7.48e-4</td></tr><tr><td>10,000 get</td><td>48.79</td><td>20.49</td><td>3.13e-4</td></tr></table></div>
47
+ </div><div class="json-to-html-collapse clearfix 0">
48
+ <div class='collapsible level0' ><span class='json-to-html-label'>binary-tree-overall</span></div>
49
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 RBTree add</td><td>5.80</td><td>172.50</td><td>7.88e-5</td></tr><tr><td>10,000 RBTree add & delete randomly</td><td>16.33</td><td>61.24</td><td>0.00</td></tr><tr><td>10,000 RBTree get</td><td>20.95</td><td>47.74</td><td>0.00</td></tr><tr><td>10,000 AVLTree add</td><td>131.91</td><td>7.58</td><td>0.01</td></tr><tr><td>10,000 AVLTree add & delete randomly</td><td>202.75</td><td>4.93</td><td>0.04</td></tr><tr><td>10,000 AVLTree get</td><td>1.02</td><td>984.65</td><td>2.43e-4</td></tr></table></div>
50
+ </div><div class="json-to-html-collapse clearfix 0">
51
+ <div class='collapsible level0' ><span class='json-to-html-label'>rb-tree</span></div>
52
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 add</td><td>88.57</td><td>11.29</td><td>0.01</td></tr><tr><td>100,000 add & delete randomly</td><td>266.59</td><td>3.75</td><td>0.06</td></tr><tr><td>100,000 getNode</td><td>201.81</td><td>4.96</td><td>0.03</td></tr><tr><td>100,000 add & iterator</td><td>116.38</td><td>8.59</td><td>0.02</td></tr></table></div>
53
+ </div><div class="json-to-html-collapse clearfix 0">
54
+ <div class='collapsible level0' ><span class='json-to-html-label'>directed-graph</span></div>
55
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 addVertex</td><td>0.10</td><td>9751.73</td><td>1.85e-6</td></tr><tr><td>1,000 addEdge</td><td>6.08</td><td>164.61</td><td>1.04e-4</td></tr><tr><td>1,000 getVertex</td><td>0.05</td><td>2.17e+4</td><td>3.55e-7</td></tr><tr><td>1,000 getEdge</td><td>25.95</td><td>38.53</td><td>0.01</td></tr><tr><td>tarjan</td><td>228.15</td><td>4.38</td><td>0.01</td></tr><tr><td>tarjan all</td><td>6998.36</td><td>0.14</td><td>0.03</td></tr><tr><td>topologicalSort</td><td>187.15</td><td>5.34</td><td>0.00</td></tr></table></div>
56
+ </div><div class="json-to-html-collapse clearfix 0">
57
+ <div class='collapsible level0' ><span class='json-to-html-label'>hash-map</span></div>
58
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 set</td><td>117.95</td><td>8.48</td><td>0.04</td></tr><tr><td>Native Map 1,000,000 set</td><td>217.09</td><td>4.61</td><td>0.03</td></tr><tr><td>Native Set 1,000,000 add</td><td>168.56</td><td>5.93</td><td>0.02</td></tr><tr><td>1,000,000 set & get</td><td>121.33</td><td>8.24</td><td>0.03</td></tr><tr><td>Native Map 1,000,000 set & get</td><td>268.81</td><td>3.72</td><td>0.02</td></tr><tr><td>Native Set 1,000,000 add & has</td><td>172.46</td><td>5.80</td><td>0.01</td></tr><tr><td>1,000,000 ObjKey set & get</td><td>411.49</td><td>2.43</td><td>0.09</td></tr><tr><td>Native Map 1,000,000 ObjKey set & get</td><td>335.40</td><td>2.98</td><td>0.07</td></tr><tr><td>Native Set 1,000,000 ObjKey add & has</td><td>287.11</td><td>3.48</td><td>0.06</td></tr></table></div>
59
+ </div><div class="json-to-html-collapse clearfix 0">
60
+ <div class='collapsible level0' ><span class='json-to-html-label'>heap</span></div>
61
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 add & poll</td><td>23.77</td><td>42.07</td><td>2.92e-4</td></tr><tr><td>100,000 add & dfs</td><td>36.94</td><td>27.07</td><td>0.01</td></tr><tr><td>10,000 fib add & pop</td><td>374.40</td><td>2.67</td><td>0.04</td></tr></table></div>
62
+ </div><div class="json-to-html-collapse clearfix 0">
63
+ <div class='collapsible level0' ><span class='json-to-html-label'>doubly-linked-list</span></div>
64
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>235.15</td><td>4.25</td><td>0.05</td></tr><tr><td>1,000,000 unshift</td><td>221.59</td><td>4.51</td><td>0.08</td></tr><tr><td>1,000,000 unshift & shift</td><td>172.11</td><td>5.81</td><td>0.02</td></tr><tr><td>1,000,000 addBefore</td><td>322.82</td><td>3.10</td><td>0.04</td></tr></table></div>
65
+ </div><div class="json-to-html-collapse clearfix 0">
66
+ <div class='collapsible level0' ><span class='json-to-html-label'>singly-linked-list</span></div>
67
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push & shift</td><td>212.64</td><td>4.70</td><td>0.07</td></tr><tr><td>10,000 push & pop</td><td>221.21</td><td>4.52</td><td>0.01</td></tr><tr><td>10,000 addBefore</td><td>251.81</td><td>3.97</td><td>0.01</td></tr></table></div>
68
+ </div><div class="json-to-html-collapse clearfix 0">
69
+ <div class='collapsible level0' ><span class='json-to-html-label'>priority-queue</span></div>
70
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 add & poll</td><td>75.00</td><td>13.33</td><td>9.50e-4</td></tr></table></div>
71
+ </div><div class="json-to-html-collapse clearfix 0">
45
72
  <div class='collapsible level0' ><span class='json-to-html-label'>deque</span></div>
46
- <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>13.42</td><td>74.51</td><td>0.00</td></tr><tr><td>10,000 push & delete</td><td>4875.89</td><td>0.21</td><td>0.29</td></tr><tr><td>1,000,000 push & pop</td><td>23.65</td><td>42.28</td><td>0.01</td></tr><tr><td>100,000 push & shift</td><td>2.13</td><td>470.21</td><td>2.10e-5</td></tr><tr><td>Native Array 100,000 push & shift</td><td>2448.00</td><td>0.41</td><td>0.06</td></tr><tr><td>100,000 unshift & shift</td><td>2.11</td><td>475.04</td><td>2.60e-5</td></tr><tr><td>Native Array 100,000 unshift & shift</td><td>4411.01</td><td>0.23</td><td>0.07</td></tr></table></div>
73
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>13.26</td><td>75.43</td><td>0.00</td></tr><tr><td>1,000,000 push & pop</td><td>21.24</td><td>47.08</td><td>1.57e-4</td></tr><tr><td>100,000 push & shift</td><td>2.20</td><td>453.65</td><td>5.13e-4</td></tr><tr><td>Native Array 100,000 push & shift</td><td>2165.42</td><td>0.46</td><td>0.19</td></tr><tr><td>100,000 unshift & shift</td><td>2.19</td><td>455.62</td><td>4.59e-4</td></tr><tr><td>Native Array 100,000 unshift & shift</td><td>4298.71</td><td>0.23</td><td>0.13</td></tr></table></div>
74
+ </div><div class="json-to-html-collapse clearfix 0">
75
+ <div class='collapsible level0' ><span class='json-to-html-label'>queue</span></div>
76
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>46.44</td><td>21.53</td><td>0.01</td></tr><tr><td>100,000 push & shift</td><td>5.00</td><td>199.87</td><td>1.37e-4</td></tr><tr><td>Native Array 100,000 push & shift</td><td>2276.16</td><td>0.44</td><td>0.12</td></tr><tr><td>Native Array 100,000 push & pop</td><td>4.33</td><td>230.72</td><td>1.58e-4</td></tr></table></div>
77
+ </div><div class="json-to-html-collapse clearfix 0">
78
+ <div class='collapsible level0' ><span class='json-to-html-label'>stack</span></div>
79
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>47.43</td><td>21.08</td><td>0.02</td></tr><tr><td>1,000,000 push & pop</td><td>50.64</td><td>19.75</td><td>0.01</td></tr></table></div>
80
+ </div><div class="json-to-html-collapse clearfix 0">
81
+ <div class='collapsible level0' ><span class='json-to-html-label'>trie</span></div>
82
+ <div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 push</td><td>47.83</td><td>20.91</td><td>0.00</td></tr><tr><td>100,000 getWords</td><td>100.67</td><td>9.93</td><td>0.01</td></tr></table></div>
47
83
  </div>
48
84
 
49
85
  </div>
@@ -1,49 +1,397 @@
1
1
  {
2
- "deque": {
2
+ "avl-tree": {
3
3
  "benchmarks": [
4
4
  {
5
- "test name": "1,000,000 push",
6
- "time taken (ms)": "13.42",
7
- "executions per sec": "74.51",
5
+ "test name": "10,000 add randomly",
6
+ "time taken (ms)": "119.60",
7
+ "executions per sec": "8.36",
8
8
  "sample deviation": "0.00"
9
9
  },
10
10
  {
11
- "test name": "10,000 push & delete",
12
- "time taken (ms)": "4875.89",
13
- "executions per sec": "0.21",
14
- "sample deviation": "0.29"
11
+ "test name": "10,000 add & delete randomly",
12
+ "time taken (ms)": "178.17",
13
+ "executions per sec": "5.61",
14
+ "sample deviation": "0.00"
15
15
  },
16
16
  {
17
- "test name": "1,000,000 push & pop",
18
- "time taken (ms)": "23.65",
19
- "executions per sec": "42.28",
17
+ "test name": "10,000 addMany",
18
+ "time taken (ms)": "129.03",
19
+ "executions per sec": "7.75",
20
+ "sample deviation": "7.48e-4"
21
+ },
22
+ {
23
+ "test name": "10,000 get",
24
+ "time taken (ms)": "48.79",
25
+ "executions per sec": "20.49",
26
+ "sample deviation": "3.13e-4"
27
+ }
28
+ ],
29
+ "testName": "avl-tree"
30
+ },
31
+ "binary-tree-overall": {
32
+ "benchmarks": [
33
+ {
34
+ "test name": "10,000 RBTree add",
35
+ "time taken (ms)": "5.80",
36
+ "executions per sec": "172.50",
37
+ "sample deviation": "7.88e-5"
38
+ },
39
+ {
40
+ "test name": "10,000 RBTree add & delete randomly",
41
+ "time taken (ms)": "16.33",
42
+ "executions per sec": "61.24",
43
+ "sample deviation": "0.00"
44
+ },
45
+ {
46
+ "test name": "10,000 RBTree get",
47
+ "time taken (ms)": "20.95",
48
+ "executions per sec": "47.74",
49
+ "sample deviation": "0.00"
50
+ },
51
+ {
52
+ "test name": "10,000 AVLTree add",
53
+ "time taken (ms)": "131.91",
54
+ "executions per sec": "7.58",
55
+ "sample deviation": "0.01"
56
+ },
57
+ {
58
+ "test name": "10,000 AVLTree add & delete randomly",
59
+ "time taken (ms)": "202.75",
60
+ "executions per sec": "4.93",
61
+ "sample deviation": "0.04"
62
+ },
63
+ {
64
+ "test name": "10,000 AVLTree get",
65
+ "time taken (ms)": "1.02",
66
+ "executions per sec": "984.65",
67
+ "sample deviation": "2.43e-4"
68
+ }
69
+ ],
70
+ "testName": "binary-tree-overall"
71
+ },
72
+ "rb-tree": {
73
+ "benchmarks": [
74
+ {
75
+ "test name": "100,000 add",
76
+ "time taken (ms)": "88.57",
77
+ "executions per sec": "11.29",
78
+ "sample deviation": "0.01"
79
+ },
80
+ {
81
+ "test name": "100,000 add & delete randomly",
82
+ "time taken (ms)": "266.59",
83
+ "executions per sec": "3.75",
84
+ "sample deviation": "0.06"
85
+ },
86
+ {
87
+ "test name": "100,000 getNode",
88
+ "time taken (ms)": "201.81",
89
+ "executions per sec": "4.96",
90
+ "sample deviation": "0.03"
91
+ },
92
+ {
93
+ "test name": "100,000 add & iterator",
94
+ "time taken (ms)": "116.38",
95
+ "executions per sec": "8.59",
96
+ "sample deviation": "0.02"
97
+ }
98
+ ],
99
+ "testName": "rb-tree"
100
+ },
101
+ "directed-graph": {
102
+ "benchmarks": [
103
+ {
104
+ "test name": "1,000 addVertex",
105
+ "time taken (ms)": "0.10",
106
+ "executions per sec": "9751.73",
107
+ "sample deviation": "1.85e-6"
108
+ },
109
+ {
110
+ "test name": "1,000 addEdge",
111
+ "time taken (ms)": "6.08",
112
+ "executions per sec": "164.61",
113
+ "sample deviation": "1.04e-4"
114
+ },
115
+ {
116
+ "test name": "1,000 getVertex",
117
+ "time taken (ms)": "0.05",
118
+ "executions per sec": "2.17e+4",
119
+ "sample deviation": "3.55e-7"
120
+ },
121
+ {
122
+ "test name": "1,000 getEdge",
123
+ "time taken (ms)": "25.95",
124
+ "executions per sec": "38.53",
125
+ "sample deviation": "0.01"
126
+ },
127
+ {
128
+ "test name": "tarjan",
129
+ "time taken (ms)": "228.15",
130
+ "executions per sec": "4.38",
131
+ "sample deviation": "0.01"
132
+ },
133
+ {
134
+ "test name": "tarjan all",
135
+ "time taken (ms)": "6998.36",
136
+ "executions per sec": "0.14",
137
+ "sample deviation": "0.03"
138
+ },
139
+ {
140
+ "test name": "topologicalSort",
141
+ "time taken (ms)": "187.15",
142
+ "executions per sec": "5.34",
143
+ "sample deviation": "0.00"
144
+ }
145
+ ],
146
+ "testName": "directed-graph"
147
+ },
148
+ "hash-map": {
149
+ "benchmarks": [
150
+ {
151
+ "test name": "1,000,000 set",
152
+ "time taken (ms)": "117.95",
153
+ "executions per sec": "8.48",
154
+ "sample deviation": "0.04"
155
+ },
156
+ {
157
+ "test name": "Native Map 1,000,000 set",
158
+ "time taken (ms)": "217.09",
159
+ "executions per sec": "4.61",
160
+ "sample deviation": "0.03"
161
+ },
162
+ {
163
+ "test name": "Native Set 1,000,000 add",
164
+ "time taken (ms)": "168.56",
165
+ "executions per sec": "5.93",
166
+ "sample deviation": "0.02"
167
+ },
168
+ {
169
+ "test name": "1,000,000 set & get",
170
+ "time taken (ms)": "121.33",
171
+ "executions per sec": "8.24",
172
+ "sample deviation": "0.03"
173
+ },
174
+ {
175
+ "test name": "Native Map 1,000,000 set & get",
176
+ "time taken (ms)": "268.81",
177
+ "executions per sec": "3.72",
178
+ "sample deviation": "0.02"
179
+ },
180
+ {
181
+ "test name": "Native Set 1,000,000 add & has",
182
+ "time taken (ms)": "172.46",
183
+ "executions per sec": "5.80",
184
+ "sample deviation": "0.01"
185
+ },
186
+ {
187
+ "test name": "1,000,000 ObjKey set & get",
188
+ "time taken (ms)": "411.49",
189
+ "executions per sec": "2.43",
190
+ "sample deviation": "0.09"
191
+ },
192
+ {
193
+ "test name": "Native Map 1,000,000 ObjKey set & get",
194
+ "time taken (ms)": "335.40",
195
+ "executions per sec": "2.98",
196
+ "sample deviation": "0.07"
197
+ },
198
+ {
199
+ "test name": "Native Set 1,000,000 ObjKey add & has",
200
+ "time taken (ms)": "287.11",
201
+ "executions per sec": "3.48",
202
+ "sample deviation": "0.06"
203
+ }
204
+ ],
205
+ "testName": "hash-map"
206
+ },
207
+ "heap": {
208
+ "benchmarks": [
209
+ {
210
+ "test name": "100,000 add & poll",
211
+ "time taken (ms)": "23.77",
212
+ "executions per sec": "42.07",
213
+ "sample deviation": "2.92e-4"
214
+ },
215
+ {
216
+ "test name": "100,000 add & dfs",
217
+ "time taken (ms)": "36.94",
218
+ "executions per sec": "27.07",
20
219
  "sample deviation": "0.01"
21
220
  },
221
+ {
222
+ "test name": "10,000 fib add & pop",
223
+ "time taken (ms)": "374.40",
224
+ "executions per sec": "2.67",
225
+ "sample deviation": "0.04"
226
+ }
227
+ ],
228
+ "testName": "heap"
229
+ },
230
+ "doubly-linked-list": {
231
+ "benchmarks": [
232
+ {
233
+ "test name": "1,000,000 push",
234
+ "time taken (ms)": "235.15",
235
+ "executions per sec": "4.25",
236
+ "sample deviation": "0.05"
237
+ },
238
+ {
239
+ "test name": "1,000,000 unshift",
240
+ "time taken (ms)": "221.59",
241
+ "executions per sec": "4.51",
242
+ "sample deviation": "0.08"
243
+ },
244
+ {
245
+ "test name": "1,000,000 unshift & shift",
246
+ "time taken (ms)": "172.11",
247
+ "executions per sec": "5.81",
248
+ "sample deviation": "0.02"
249
+ },
250
+ {
251
+ "test name": "1,000,000 addBefore",
252
+ "time taken (ms)": "322.82",
253
+ "executions per sec": "3.10",
254
+ "sample deviation": "0.04"
255
+ }
256
+ ],
257
+ "testName": "doubly-linked-list"
258
+ },
259
+ "singly-linked-list": {
260
+ "benchmarks": [
261
+ {
262
+ "test name": "1,000,000 push & shift",
263
+ "time taken (ms)": "212.64",
264
+ "executions per sec": "4.70",
265
+ "sample deviation": "0.07"
266
+ },
267
+ {
268
+ "test name": "10,000 push & pop",
269
+ "time taken (ms)": "221.21",
270
+ "executions per sec": "4.52",
271
+ "sample deviation": "0.01"
272
+ },
273
+ {
274
+ "test name": "10,000 addBefore",
275
+ "time taken (ms)": "251.81",
276
+ "executions per sec": "3.97",
277
+ "sample deviation": "0.01"
278
+ }
279
+ ],
280
+ "testName": "singly-linked-list"
281
+ },
282
+ "priority-queue": {
283
+ "benchmarks": [
284
+ {
285
+ "test name": "100,000 add & poll",
286
+ "time taken (ms)": "75.00",
287
+ "executions per sec": "13.33",
288
+ "sample deviation": "9.50e-4"
289
+ }
290
+ ],
291
+ "testName": "priority-queue"
292
+ },
293
+ "deque": {
294
+ "benchmarks": [
295
+ {
296
+ "test name": "1,000,000 push",
297
+ "time taken (ms)": "13.26",
298
+ "executions per sec": "75.43",
299
+ "sample deviation": "0.00"
300
+ },
301
+ {
302
+ "test name": "1,000,000 push & pop",
303
+ "time taken (ms)": "21.24",
304
+ "executions per sec": "47.08",
305
+ "sample deviation": "1.57e-4"
306
+ },
22
307
  {
23
308
  "test name": "100,000 push & shift",
24
- "time taken (ms)": "2.13",
25
- "executions per sec": "470.21",
26
- "sample deviation": "2.10e-5"
309
+ "time taken (ms)": "2.20",
310
+ "executions per sec": "453.65",
311
+ "sample deviation": "5.13e-4"
27
312
  },
28
313
  {
29
314
  "test name": "Native Array 100,000 push & shift",
30
- "time taken (ms)": "2448.00",
31
- "executions per sec": "0.41",
32
- "sample deviation": "0.06"
315
+ "time taken (ms)": "2165.42",
316
+ "executions per sec": "0.46",
317
+ "sample deviation": "0.19"
33
318
  },
34
319
  {
35
320
  "test name": "100,000 unshift & shift",
36
- "time taken (ms)": "2.11",
37
- "executions per sec": "475.04",
38
- "sample deviation": "2.60e-5"
321
+ "time taken (ms)": "2.19",
322
+ "executions per sec": "455.62",
323
+ "sample deviation": "4.59e-4"
39
324
  },
40
325
  {
41
326
  "test name": "Native Array 100,000 unshift & shift",
42
- "time taken (ms)": "4411.01",
327
+ "time taken (ms)": "4298.71",
43
328
  "executions per sec": "0.23",
44
- "sample deviation": "0.07"
329
+ "sample deviation": "0.13"
45
330
  }
46
331
  ],
47
332
  "testName": "deque"
333
+ },
334
+ "queue": {
335
+ "benchmarks": [
336
+ {
337
+ "test name": "1,000,000 push",
338
+ "time taken (ms)": "46.44",
339
+ "executions per sec": "21.53",
340
+ "sample deviation": "0.01"
341
+ },
342
+ {
343
+ "test name": "100,000 push & shift",
344
+ "time taken (ms)": "5.00",
345
+ "executions per sec": "199.87",
346
+ "sample deviation": "1.37e-4"
347
+ },
348
+ {
349
+ "test name": "Native Array 100,000 push & shift",
350
+ "time taken (ms)": "2276.16",
351
+ "executions per sec": "0.44",
352
+ "sample deviation": "0.12"
353
+ },
354
+ {
355
+ "test name": "Native Array 100,000 push & pop",
356
+ "time taken (ms)": "4.33",
357
+ "executions per sec": "230.72",
358
+ "sample deviation": "1.58e-4"
359
+ }
360
+ ],
361
+ "testName": "queue"
362
+ },
363
+ "stack": {
364
+ "benchmarks": [
365
+ {
366
+ "test name": "1,000,000 push",
367
+ "time taken (ms)": "47.43",
368
+ "executions per sec": "21.08",
369
+ "sample deviation": "0.02"
370
+ },
371
+ {
372
+ "test name": "1,000,000 push & pop",
373
+ "time taken (ms)": "50.64",
374
+ "executions per sec": "19.75",
375
+ "sample deviation": "0.01"
376
+ }
377
+ ],
378
+ "testName": "stack"
379
+ },
380
+ "trie": {
381
+ "benchmarks": [
382
+ {
383
+ "test name": "100,000 push",
384
+ "time taken (ms)": "47.83",
385
+ "executions per sec": "20.91",
386
+ "sample deviation": "0.00"
387
+ },
388
+ {
389
+ "test name": "100,000 getWords",
390
+ "time taken (ms)": "100.67",
391
+ "executions per sec": "9.93",
392
+ "sample deviation": "0.01"
393
+ }
394
+ ],
395
+ "testName": "trie"
48
396
  }
49
397
  }