data-structure-typed 1.47.6 → 1.47.8

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 (142) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +10 -7
  2. package/.github/workflows/ci.yml +1 -1
  3. package/.github/workflows/release-package.yml +1 -1
  4. package/CHANGELOG.md +1 -1
  5. package/CODE_OF_CONDUCT.md +32 -10
  6. package/COMMANDS.md +3 -1
  7. package/CONTRIBUTING.md +4 -3
  8. package/README.md +188 -32
  9. package/SECURITY.md +1 -1
  10. package/benchmark/report.html +46 -1
  11. package/benchmark/report.json +563 -8
  12. package/dist/cjs/data-structures/binary-tree/avl-tree.d.ts +40 -22
  13. package/dist/cjs/data-structures/binary-tree/avl-tree.js +45 -36
  14. package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +1 -1
  15. package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +105 -113
  16. package/dist/cjs/data-structures/binary-tree/binary-tree.js +133 -119
  17. package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +1 -1
  18. package/dist/cjs/data-structures/binary-tree/bst.d.ts +53 -44
  19. package/dist/cjs/data-structures/binary-tree/bst.js +137 -154
  20. package/dist/cjs/data-structures/binary-tree/bst.js.map +1 -1
  21. package/dist/cjs/data-structures/binary-tree/rb-tree.d.ts +48 -15
  22. package/dist/cjs/data-structures/binary-tree/rb-tree.js +70 -33
  23. package/dist/cjs/data-structures/binary-tree/rb-tree.js.map +1 -1
  24. package/dist/cjs/data-structures/binary-tree/segment-tree.d.ts +6 -6
  25. package/dist/cjs/data-structures/binary-tree/segment-tree.js +7 -7
  26. package/dist/cjs/data-structures/binary-tree/segment-tree.js.map +1 -1
  27. package/dist/cjs/data-structures/binary-tree/tree-multimap.d.ts +26 -37
  28. package/dist/cjs/data-structures/binary-tree/tree-multimap.js +58 -137
  29. package/dist/cjs/data-structures/binary-tree/tree-multimap.js.map +1 -1
  30. package/dist/cjs/data-structures/graph/abstract-graph.d.ts +17 -17
  31. package/dist/cjs/data-structures/graph/abstract-graph.js +30 -30
  32. package/dist/cjs/data-structures/graph/abstract-graph.js.map +1 -1
  33. package/dist/cjs/data-structures/graph/directed-graph.d.ts +24 -24
  34. package/dist/cjs/data-structures/graph/directed-graph.js +28 -28
  35. package/dist/cjs/data-structures/graph/directed-graph.js.map +1 -1
  36. package/dist/cjs/data-structures/graph/undirected-graph.d.ts +14 -14
  37. package/dist/cjs/data-structures/graph/undirected-graph.js +18 -18
  38. package/dist/cjs/data-structures/graph/undirected-graph.js.map +1 -1
  39. package/dist/cjs/data-structures/hash/hash-map.d.ts +2 -6
  40. package/dist/cjs/data-structures/hash/hash-map.js +5 -8
  41. package/dist/cjs/data-structures/hash/hash-map.js.map +1 -1
  42. package/dist/cjs/data-structures/linked-list/doubly-linked-list.d.ts +28 -28
  43. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js +33 -33
  44. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +1 -1
  45. package/dist/cjs/data-structures/linked-list/singly-linked-list.d.ts +21 -21
  46. package/dist/cjs/data-structures/linked-list/singly-linked-list.js +27 -27
  47. package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +1 -1
  48. package/dist/cjs/data-structures/linked-list/skip-linked-list.js +4 -4
  49. package/dist/cjs/data-structures/linked-list/skip-linked-list.js.map +1 -1
  50. package/dist/cjs/data-structures/queue/queue.d.ts +13 -13
  51. package/dist/cjs/data-structures/queue/queue.js +13 -13
  52. package/dist/cjs/data-structures/stack/stack.d.ts +6 -6
  53. package/dist/cjs/data-structures/stack/stack.js +7 -7
  54. package/dist/cjs/data-structures/stack/stack.js.map +1 -1
  55. package/dist/cjs/data-structures/trie/trie.d.ts +3 -0
  56. package/dist/cjs/data-structures/trie/trie.js +19 -4
  57. package/dist/cjs/data-structures/trie/trie.js.map +1 -1
  58. package/dist/cjs/interfaces/binary-tree.d.ts +3 -3
  59. package/dist/cjs/types/common.d.ts +6 -1
  60. package/dist/cjs/types/data-structures/graph/abstract-graph.d.ts +2 -2
  61. package/dist/cjs/types/data-structures/hash/hash-map.d.ts +1 -2
  62. package/dist/mjs/data-structures/binary-tree/avl-tree.d.ts +40 -22
  63. package/dist/mjs/data-structures/binary-tree/avl-tree.js +45 -36
  64. package/dist/mjs/data-structures/binary-tree/binary-tree.d.ts +105 -113
  65. package/dist/mjs/data-structures/binary-tree/binary-tree.js +133 -128
  66. package/dist/mjs/data-structures/binary-tree/bst.d.ts +53 -44
  67. package/dist/mjs/data-structures/binary-tree/bst.js +137 -154
  68. package/dist/mjs/data-structures/binary-tree/rb-tree.d.ts +48 -15
  69. package/dist/mjs/data-structures/binary-tree/rb-tree.js +70 -33
  70. package/dist/mjs/data-structures/binary-tree/segment-tree.d.ts +6 -6
  71. package/dist/mjs/data-structures/binary-tree/segment-tree.js +7 -7
  72. package/dist/mjs/data-structures/binary-tree/tree-multimap.d.ts +26 -37
  73. package/dist/mjs/data-structures/binary-tree/tree-multimap.js +59 -138
  74. package/dist/mjs/data-structures/graph/abstract-graph.d.ts +17 -17
  75. package/dist/mjs/data-structures/graph/abstract-graph.js +30 -30
  76. package/dist/mjs/data-structures/graph/directed-graph.d.ts +24 -24
  77. package/dist/mjs/data-structures/graph/directed-graph.js +28 -28
  78. package/dist/mjs/data-structures/graph/undirected-graph.d.ts +14 -14
  79. package/dist/mjs/data-structures/graph/undirected-graph.js +18 -18
  80. package/dist/mjs/data-structures/hash/hash-map.d.ts +2 -6
  81. package/dist/mjs/data-structures/hash/hash-map.js +5 -8
  82. package/dist/mjs/data-structures/linked-list/doubly-linked-list.d.ts +28 -28
  83. package/dist/mjs/data-structures/linked-list/doubly-linked-list.js +33 -33
  84. package/dist/mjs/data-structures/linked-list/singly-linked-list.d.ts +21 -21
  85. package/dist/mjs/data-structures/linked-list/singly-linked-list.js +27 -27
  86. package/dist/mjs/data-structures/linked-list/skip-linked-list.js +4 -4
  87. package/dist/mjs/data-structures/queue/queue.d.ts +13 -13
  88. package/dist/mjs/data-structures/queue/queue.js +13 -13
  89. package/dist/mjs/data-structures/stack/stack.d.ts +6 -6
  90. package/dist/mjs/data-structures/stack/stack.js +7 -7
  91. package/dist/mjs/data-structures/trie/trie.d.ts +3 -0
  92. package/dist/mjs/data-structures/trie/trie.js +20 -4
  93. package/dist/mjs/interfaces/binary-tree.d.ts +3 -3
  94. package/dist/mjs/types/common.d.ts +6 -1
  95. package/dist/mjs/types/data-structures/graph/abstract-graph.d.ts +2 -2
  96. package/dist/mjs/types/data-structures/hash/hash-map.d.ts +1 -2
  97. package/dist/umd/data-structure-typed.js +583 -627
  98. package/dist/umd/data-structure-typed.min.js +2 -2
  99. package/dist/umd/data-structure-typed.min.js.map +1 -1
  100. package/package.json +1 -1
  101. package/src/data-structures/binary-tree/avl-tree.ts +59 -39
  102. package/src/data-structures/binary-tree/binary-tree.ts +192 -180
  103. package/src/data-structures/binary-tree/bst.ts +157 -154
  104. package/src/data-structures/binary-tree/rb-tree.ts +78 -37
  105. package/src/data-structures/binary-tree/segment-tree.ts +10 -10
  106. package/src/data-structures/binary-tree/tree-multimap.ts +67 -145
  107. package/src/data-structures/graph/abstract-graph.ts +46 -46
  108. package/src/data-structures/graph/directed-graph.ts +40 -40
  109. package/src/data-structures/graph/undirected-graph.ts +26 -26
  110. package/src/data-structures/hash/hash-map.ts +8 -8
  111. package/src/data-structures/linked-list/doubly-linked-list.ts +45 -45
  112. package/src/data-structures/linked-list/singly-linked-list.ts +38 -38
  113. package/src/data-structures/linked-list/skip-linked-list.ts +4 -4
  114. package/src/data-structures/queue/queue.ts +13 -13
  115. package/src/data-structures/stack/stack.ts +9 -9
  116. package/src/data-structures/trie/trie.ts +23 -4
  117. package/src/interfaces/binary-tree.ts +3 -3
  118. package/src/types/common.ts +11 -1
  119. package/src/types/data-structures/graph/abstract-graph.ts +2 -2
  120. package/src/types/data-structures/hash/hash-map.ts +1 -2
  121. package/test/integration/{all-in-one.ts → all-in-one.test.ts} +1 -1
  122. package/test/integration/index.html +158 -2
  123. package/test/performance/data-structures/comparison/comparison.test.ts +5 -5
  124. package/test/performance/data-structures/linked-list/doubly-linked-list.test.ts +1 -1
  125. package/test/performance/data-structures/linked-list/singly-linked-list.test.ts +1 -1
  126. package/test/unit/data-structures/binary-tree/avl-tree.test.ts +19 -19
  127. package/test/unit/data-structures/binary-tree/binary-tree.test.ts +50 -51
  128. package/test/unit/data-structures/binary-tree/bst.test.ts +49 -54
  129. package/test/unit/data-structures/binary-tree/overall.test.ts +17 -18
  130. package/test/unit/data-structures/binary-tree/rb-tree.test.ts +3 -3
  131. package/test/unit/data-structures/binary-tree/segment-tree.test.ts +1 -1
  132. package/test/unit/data-structures/binary-tree/tree-multimap.test.ts +118 -66
  133. package/test/unit/data-structures/graph/abstract-graph.test.ts +4 -4
  134. package/test/unit/data-structures/graph/directed-graph.test.ts +10 -10
  135. package/test/unit/data-structures/graph/undirected-graph.test.ts +3 -3
  136. package/test/unit/data-structures/linked-list/doubly-linked-list.test.ts +14 -14
  137. package/test/unit/data-structures/linked-list/singly-linked-list.test.ts +3 -3
  138. package/test/unit/data-structures/linked-list/skip-list.test.ts +1 -1
  139. package/test/unit/data-structures/queue/deque.test.ts +1 -1
  140. package/test/unit/data-structures/stack/stack.test.ts +2 -2
  141. package/test/unit/unrestricted-interconversion.test.ts +61 -5
  142. package/tsconfig-cjs.json +1 -1
@@ -42,8 +42,53 @@
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>33.09</td><td>30.22</td><td>4.32e-4</td></tr><tr><td>10,000 add & delete randomly</td><td>74.12</td><td>13.49</td><td>0.00</td></tr><tr><td>10,000 addMany</td><td>41.71</td><td>23.97</td><td>0.00</td></tr><tr><td>10,000 get</td><td>28.37</td><td>35.25</td><td>2.37e-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</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>1,000 add randomly</td><td>14.50</td><td>68.96</td><td>1.33e-4</td></tr><tr><td>1,000 add & delete randomly</td><td>16.20</td><td>61.72</td><td>2.03e-4</td></tr><tr><td>1,000 addMany</td><td>10.51</td><td>95.12</td><td>8.76e-5</td></tr><tr><td>1,000 get</td><td>18.28</td><td>54.69</td><td>1.82e-4</td></tr><tr><td>1,000 dfs</td><td>157.23</td><td>6.36</td><td>7.06e-4</td></tr><tr><td>1,000 bfs</td><td>58.06</td><td>17.22</td><td>0.01</td></tr><tr><td>1,000 morris</td><td>256.36</td><td>3.90</td><td>0.00</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'>bst</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>10,000 add randomly</td><td>30.48</td><td>32.81</td><td>4.13e-4</td></tr><tr><td>10,000 add & delete randomly</td><td>71.84</td><td>13.92</td><td>0.00</td></tr><tr><td>10,000 addMany</td><td>29.54</td><td>33.85</td><td>5.25e-4</td></tr><tr><td>10,000 get</td><td>30.53</td><td>32.75</td><td>0.01</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'>rb-tree</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>100,000 add</td><td>90.89</td><td>11.00</td><td>0.00</td></tr><tr><td>100,000 CPT add</td><td>50.65</td><td>19.74</td><td>0.00</td></tr><tr><td>100,000 add & delete randomly</td><td>230.08</td><td>4.35</td><td>0.02</td></tr><tr><td>100,000 getNode</td><td>38.97</td><td>25.66</td><td>5.82e-4</td></tr><tr><td>100,000 add & iterator</td><td>118.32</td><td>8.45</td><td>0.01</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'>comparison</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>SRC PQ 10,000 add</td><td>0.14</td><td>6939.33</td><td>1.74e-6</td></tr><tr><td>CJS PQ 10,000 add</td><td>0.15</td><td>6881.64</td><td>1.91e-6</td></tr><tr><td>MJS PQ 10,000 add</td><td>0.57</td><td>1745.92</td><td>1.60e-5</td></tr><tr><td>CPT PQ 10,000 add</td><td>0.57</td><td>1744.71</td><td>1.01e-5</td></tr><tr><td>SRC PQ 10,000 add & pop</td><td>3.51</td><td>284.93</td><td>6.79e-4</td></tr><tr><td>CJS PQ 10,000 add & pop</td><td>3.42</td><td>292.55</td><td>4.04e-5</td></tr><tr><td>MJS PQ 10,000 add & pop</td><td>3.41</td><td>293.38</td><td>5.11e-5</td></tr><tr><td>CPT PQ 10,000 add & pop</td><td>2.09</td><td>478.76</td><td>2.28e-5</td></tr><tr><td>CPT OM 100,000 add</td><td>43.22</td><td>23.14</td><td>0.00</td></tr><tr><td>CPT HM 10,000 set</td><td>0.58</td><td>1721.25</td><td>1.85e-5</td></tr><tr><td>CPT HM 10,000 set & get</td><td>0.68</td><td>1477.31</td><td>1.26e-5</td></tr><tr><td>CPT LL 1,000,000 unshift</td><td>81.38</td><td>12.29</td><td>0.02</td></tr><tr><td>CPT PQ 10,000 add & pop</td><td>2.10</td><td>476.50</td><td>1.60e-4</td></tr><tr><td>CPT DQ 1,000,000 push</td><td>22.51</td><td>44.42</td><td>0.00</td></tr><tr><td>CPT Q 1,000,000 push</td><td>47.85</td><td>20.90</td><td>0.01</td></tr><tr><td>CPT ST 1,000,000 push</td><td>42.54</td><td>23.51</td><td>0.01</td></tr><tr><td>CPT ST 1,000,000 push & pop</td><td>50.08</td><td>19.97</td><td>0.00</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'>directed-graph</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>1,000 addVertex</td><td>0.11</td><td>9501.34</td><td>6.10e-6</td></tr><tr><td>1,000 addEdge</td><td>6.35</td><td>157.55</td><td>6.69e-4</td></tr><tr><td>1,000 getVertex</td><td>0.05</td><td>2.14e+4</td><td>2.50e-6</td></tr><tr><td>1,000 getEdge</td><td>25.00</td><td>39.99</td><td>0.01</td></tr><tr><td>tarjan</td><td>219.46</td><td>4.56</td><td>0.01</td></tr><tr><td>tarjan all</td><td>218.15</td><td>4.58</td><td>0.00</td></tr><tr><td>topologicalSort</td><td>176.83</td><td>5.66</td><td>0.00</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'>hash-map</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 set</td><td>254.46</td><td>3.93</td><td>0.04</td></tr><tr><td>1,000,000 CPT set</td><td>251.21</td><td>3.98</td><td>0.03</td></tr><tr><td>1,000,000 Map set</td><td>211.27</td><td>4.73</td><td>0.01</td></tr><tr><td>1,000,000 Set add</td><td>175.15</td><td>5.71</td><td>0.02</td></tr><tr><td>1,000,000 set & get</td><td>370.54</td><td>2.70</td><td>0.11</td></tr><tr><td>1,000,000 CPT set & get</td><td>283.34</td><td>3.53</td><td>0.07</td></tr><tr><td>1,000,000 Map set & get</td><td>287.09</td><td>3.48</td><td>0.04</td></tr><tr><td>1,000,000 Set add & has</td><td>190.50</td><td>5.25</td><td>0.01</td></tr><tr><td>1,000,000 ObjKey set & get</td><td>880.47</td><td>1.14</td><td>0.10</td></tr><tr><td>1,000,000 Map ObjKey set & get</td><td>334.47</td><td>2.99</td><td>0.05</td></tr><tr><td>1,000,000 Set ObjKey add & has</td><td>310.12</td><td>3.22</td><td>0.06</td></tr></table></div>
65
+ </div><div class="json-to-html-collapse clearfix 0">
45
66
  <div class='collapsible level0' ><span class='json-to-html-label'>heap</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>100,000 add & pop</td><td>24.45</td><td>40.90</td><td>0.00</td></tr><tr><td>100,000 add & dfs</td><td>32.55</td><td>30.72</td><td>6.11e-4</td></tr><tr><td>10,000 fib add & pop</td><td>347.99</td><td>2.87</td><td>0.00</td></tr></table></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>100,000 add & pop</td><td>80.13</td><td>12.48</td><td>0.00</td></tr><tr><td>100,000 add & dfs</td><td>35.08</td><td>28.50</td><td>0.00</td></tr><tr><td>10,000 fib add & pop</td><td>367.84</td><td>2.72</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'>doubly-linked-list</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>1,000,000 push</td><td>237.28</td><td>4.21</td><td>0.07</td></tr><tr><td>1,000,000 CPT push</td><td>75.66</td><td>13.22</td><td>0.03</td></tr><tr><td>1,000,000 unshift</td><td>226.38</td><td>4.42</td><td>0.05</td></tr><tr><td>1,000,000 CPT unshift</td><td>93.34</td><td>10.71</td><td>0.07</td></tr><tr><td>1,000,000 unshift & shift</td><td>188.34</td><td>5.31</td><td>0.05</td></tr><tr><td>1,000,000 insertBefore</td><td>329.60</td><td>3.03</td><td>0.05</td></tr></table></div>
71
+ </div><div class="json-to-html-collapse clearfix 0">
72
+ <div class='collapsible level0' ><span class='json-to-html-label'>singly-linked-list</span></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>10,000 push & pop</td><td>221.32</td><td>4.52</td><td>0.01</td></tr><tr><td>10,000 insertBefore</td><td>255.52</td><td>3.91</td><td>0.01</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'>max-priority-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>10,000 refill & poll</td><td>9.07</td><td>110.24</td><td>2.71e-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'>priority-queue</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>100,000 add & pop</td><td>101.93</td><td>9.81</td><td>7.95e-4</td></tr><tr><td>100,000 CPT add & pop</td><td>28.54</td><td>35.04</td><td>0.00</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'>deque</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>1,000,000 push</td><td>14.43</td><td>69.29</td><td>2.36e-4</td></tr><tr><td>1,000,000 CPT push</td><td>25.08</td><td>39.87</td><td>0.01</td></tr><tr><td>1,000,000 push & pop</td><td>22.87</td><td>43.72</td><td>6.05e-4</td></tr><tr><td>1,000,000 push & shift</td><td>25.28</td><td>39.55</td><td>0.01</td></tr><tr><td>1,000,000 unshift & shift</td><td>21.88</td><td>45.71</td><td>2.05e-4</td></tr></table></div>
83
+ </div><div class="json-to-html-collapse clearfix 0">
84
+ <div class='collapsible level0' ><span class='json-to-html-label'>queue</span></div>
85
+ <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>38.49</td><td>25.98</td><td>9.08e-4</td></tr><tr><td>1,000,000 CPT push</td><td>43.93</td><td>22.76</td><td>0.01</td></tr><tr><td>1,000,000 push & shift</td><td>82.85</td><td>12.07</td><td>0.00</td></tr></table></div>
86
+ </div><div class="json-to-html-collapse clearfix 0">
87
+ <div class='collapsible level0' ><span class='json-to-html-label'>stack</span></div>
88
+ <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>40.19</td><td>24.88</td><td>0.01</td></tr><tr><td>1,000,000 CPT push</td><td>39.87</td><td>25.08</td><td>0.00</td></tr><tr><td>1,000,000 push & pop</td><td>41.67</td><td>24.00</td><td>0.01</td></tr><tr><td>1,000,000 CPT push & pop</td><td>46.65</td><td>21.44</td><td>0.00</td></tr></table></div>
89
+ </div><div class="json-to-html-collapse clearfix 0">
90
+ <div class='collapsible level0' ><span class='json-to-html-label'>trie</span></div>
91
+ <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>43.42</td><td>23.03</td><td>7.57e-4</td></tr><tr><td>100,000 getWords</td><td>93.41</td><td>10.71</td><td>0.00</td></tr></table></div>
47
92
  </div>
48
93
 
49
94
  </div>
@@ -1,25 +1,580 @@
1
1
  {
2
+ "avl-tree": {
3
+ "benchmarks": [
4
+ {
5
+ "test name": "10,000 add randomly",
6
+ "time taken (ms)": "33.09",
7
+ "executions per sec": "30.22",
8
+ "sample deviation": "4.32e-4"
9
+ },
10
+ {
11
+ "test name": "10,000 add & delete randomly",
12
+ "time taken (ms)": "74.12",
13
+ "executions per sec": "13.49",
14
+ "sample deviation": "0.00"
15
+ },
16
+ {
17
+ "test name": "10,000 addMany",
18
+ "time taken (ms)": "41.71",
19
+ "executions per sec": "23.97",
20
+ "sample deviation": "0.00"
21
+ },
22
+ {
23
+ "test name": "10,000 get",
24
+ "time taken (ms)": "28.37",
25
+ "executions per sec": "35.25",
26
+ "sample deviation": "2.37e-4"
27
+ }
28
+ ],
29
+ "testName": "avl-tree"
30
+ },
31
+ "binary-tree": {
32
+ "benchmarks": [
33
+ {
34
+ "test name": "1,000 add randomly",
35
+ "time taken (ms)": "14.50",
36
+ "executions per sec": "68.96",
37
+ "sample deviation": "1.33e-4"
38
+ },
39
+ {
40
+ "test name": "1,000 add & delete randomly",
41
+ "time taken (ms)": "16.20",
42
+ "executions per sec": "61.72",
43
+ "sample deviation": "2.03e-4"
44
+ },
45
+ {
46
+ "test name": "1,000 addMany",
47
+ "time taken (ms)": "10.51",
48
+ "executions per sec": "95.12",
49
+ "sample deviation": "8.76e-5"
50
+ },
51
+ {
52
+ "test name": "1,000 get",
53
+ "time taken (ms)": "18.28",
54
+ "executions per sec": "54.69",
55
+ "sample deviation": "1.82e-4"
56
+ },
57
+ {
58
+ "test name": "1,000 dfs",
59
+ "time taken (ms)": "157.23",
60
+ "executions per sec": "6.36",
61
+ "sample deviation": "7.06e-4"
62
+ },
63
+ {
64
+ "test name": "1,000 bfs",
65
+ "time taken (ms)": "58.06",
66
+ "executions per sec": "17.22",
67
+ "sample deviation": "0.01"
68
+ },
69
+ {
70
+ "test name": "1,000 morris",
71
+ "time taken (ms)": "256.36",
72
+ "executions per sec": "3.90",
73
+ "sample deviation": "0.00"
74
+ }
75
+ ],
76
+ "testName": "binary-tree"
77
+ },
78
+ "bst": {
79
+ "benchmarks": [
80
+ {
81
+ "test name": "10,000 add randomly",
82
+ "time taken (ms)": "30.48",
83
+ "executions per sec": "32.81",
84
+ "sample deviation": "4.13e-4"
85
+ },
86
+ {
87
+ "test name": "10,000 add & delete randomly",
88
+ "time taken (ms)": "71.84",
89
+ "executions per sec": "13.92",
90
+ "sample deviation": "0.00"
91
+ },
92
+ {
93
+ "test name": "10,000 addMany",
94
+ "time taken (ms)": "29.54",
95
+ "executions per sec": "33.85",
96
+ "sample deviation": "5.25e-4"
97
+ },
98
+ {
99
+ "test name": "10,000 get",
100
+ "time taken (ms)": "30.53",
101
+ "executions per sec": "32.75",
102
+ "sample deviation": "0.01"
103
+ }
104
+ ],
105
+ "testName": "bst"
106
+ },
107
+ "rb-tree": {
108
+ "benchmarks": [
109
+ {
110
+ "test name": "100,000 add",
111
+ "time taken (ms)": "90.89",
112
+ "executions per sec": "11.00",
113
+ "sample deviation": "0.00"
114
+ },
115
+ {
116
+ "test name": "100,000 CPT add",
117
+ "time taken (ms)": "50.65",
118
+ "executions per sec": "19.74",
119
+ "sample deviation": "0.00"
120
+ },
121
+ {
122
+ "test name": "100,000 add & delete randomly",
123
+ "time taken (ms)": "230.08",
124
+ "executions per sec": "4.35",
125
+ "sample deviation": "0.02"
126
+ },
127
+ {
128
+ "test name": "100,000 getNode",
129
+ "time taken (ms)": "38.97",
130
+ "executions per sec": "25.66",
131
+ "sample deviation": "5.82e-4"
132
+ },
133
+ {
134
+ "test name": "100,000 add & iterator",
135
+ "time taken (ms)": "118.32",
136
+ "executions per sec": "8.45",
137
+ "sample deviation": "0.01"
138
+ }
139
+ ],
140
+ "testName": "rb-tree"
141
+ },
142
+ "comparison": {
143
+ "benchmarks": [
144
+ {
145
+ "test name": "SRC PQ 10,000 add",
146
+ "time taken (ms)": "0.14",
147
+ "executions per sec": "6939.33",
148
+ "sample deviation": "1.74e-6"
149
+ },
150
+ {
151
+ "test name": "CJS PQ 10,000 add",
152
+ "time taken (ms)": "0.15",
153
+ "executions per sec": "6881.64",
154
+ "sample deviation": "1.91e-6"
155
+ },
156
+ {
157
+ "test name": "MJS PQ 10,000 add",
158
+ "time taken (ms)": "0.57",
159
+ "executions per sec": "1745.92",
160
+ "sample deviation": "1.60e-5"
161
+ },
162
+ {
163
+ "test name": "CPT PQ 10,000 add",
164
+ "time taken (ms)": "0.57",
165
+ "executions per sec": "1744.71",
166
+ "sample deviation": "1.01e-5"
167
+ },
168
+ {
169
+ "test name": "SRC PQ 10,000 add & pop",
170
+ "time taken (ms)": "3.51",
171
+ "executions per sec": "284.93",
172
+ "sample deviation": "6.79e-4"
173
+ },
174
+ {
175
+ "test name": "CJS PQ 10,000 add & pop",
176
+ "time taken (ms)": "3.42",
177
+ "executions per sec": "292.55",
178
+ "sample deviation": "4.04e-5"
179
+ },
180
+ {
181
+ "test name": "MJS PQ 10,000 add & pop",
182
+ "time taken (ms)": "3.41",
183
+ "executions per sec": "293.38",
184
+ "sample deviation": "5.11e-5"
185
+ },
186
+ {
187
+ "test name": "CPT PQ 10,000 add & pop",
188
+ "time taken (ms)": "2.09",
189
+ "executions per sec": "478.76",
190
+ "sample deviation": "2.28e-5"
191
+ },
192
+ {
193
+ "test name": "CPT OM 100,000 add",
194
+ "time taken (ms)": "43.22",
195
+ "executions per sec": "23.14",
196
+ "sample deviation": "0.00"
197
+ },
198
+ {
199
+ "test name": "CPT HM 10,000 set",
200
+ "time taken (ms)": "0.58",
201
+ "executions per sec": "1721.25",
202
+ "sample deviation": "1.85e-5"
203
+ },
204
+ {
205
+ "test name": "CPT HM 10,000 set & get",
206
+ "time taken (ms)": "0.68",
207
+ "executions per sec": "1477.31",
208
+ "sample deviation": "1.26e-5"
209
+ },
210
+ {
211
+ "test name": "CPT LL 1,000,000 unshift",
212
+ "time taken (ms)": "81.38",
213
+ "executions per sec": "12.29",
214
+ "sample deviation": "0.02"
215
+ },
216
+ {
217
+ "test name": "CPT PQ 10,000 add & pop",
218
+ "time taken (ms)": "2.10",
219
+ "executions per sec": "476.50",
220
+ "sample deviation": "1.60e-4"
221
+ },
222
+ {
223
+ "test name": "CPT DQ 1,000,000 push",
224
+ "time taken (ms)": "22.51",
225
+ "executions per sec": "44.42",
226
+ "sample deviation": "0.00"
227
+ },
228
+ {
229
+ "test name": "CPT Q 1,000,000 push",
230
+ "time taken (ms)": "47.85",
231
+ "executions per sec": "20.90",
232
+ "sample deviation": "0.01"
233
+ },
234
+ {
235
+ "test name": "CPT ST 1,000,000 push",
236
+ "time taken (ms)": "42.54",
237
+ "executions per sec": "23.51",
238
+ "sample deviation": "0.01"
239
+ },
240
+ {
241
+ "test name": "CPT ST 1,000,000 push & pop",
242
+ "time taken (ms)": "50.08",
243
+ "executions per sec": "19.97",
244
+ "sample deviation": "0.00"
245
+ }
246
+ ],
247
+ "testName": "comparison"
248
+ },
249
+ "directed-graph": {
250
+ "benchmarks": [
251
+ {
252
+ "test name": "1,000 addVertex",
253
+ "time taken (ms)": "0.11",
254
+ "executions per sec": "9501.34",
255
+ "sample deviation": "6.10e-6"
256
+ },
257
+ {
258
+ "test name": "1,000 addEdge",
259
+ "time taken (ms)": "6.35",
260
+ "executions per sec": "157.55",
261
+ "sample deviation": "6.69e-4"
262
+ },
263
+ {
264
+ "test name": "1,000 getVertex",
265
+ "time taken (ms)": "0.05",
266
+ "executions per sec": "2.14e+4",
267
+ "sample deviation": "2.50e-6"
268
+ },
269
+ {
270
+ "test name": "1,000 getEdge",
271
+ "time taken (ms)": "25.00",
272
+ "executions per sec": "39.99",
273
+ "sample deviation": "0.01"
274
+ },
275
+ {
276
+ "test name": "tarjan",
277
+ "time taken (ms)": "219.46",
278
+ "executions per sec": "4.56",
279
+ "sample deviation": "0.01"
280
+ },
281
+ {
282
+ "test name": "tarjan all",
283
+ "time taken (ms)": "218.15",
284
+ "executions per sec": "4.58",
285
+ "sample deviation": "0.00"
286
+ },
287
+ {
288
+ "test name": "topologicalSort",
289
+ "time taken (ms)": "176.83",
290
+ "executions per sec": "5.66",
291
+ "sample deviation": "0.00"
292
+ }
293
+ ],
294
+ "testName": "directed-graph"
295
+ },
296
+ "hash-map": {
297
+ "benchmarks": [
298
+ {
299
+ "test name": "1,000,000 set",
300
+ "time taken (ms)": "254.46",
301
+ "executions per sec": "3.93",
302
+ "sample deviation": "0.04"
303
+ },
304
+ {
305
+ "test name": "1,000,000 CPT set",
306
+ "time taken (ms)": "251.21",
307
+ "executions per sec": "3.98",
308
+ "sample deviation": "0.03"
309
+ },
310
+ {
311
+ "test name": "1,000,000 Map set",
312
+ "time taken (ms)": "211.27",
313
+ "executions per sec": "4.73",
314
+ "sample deviation": "0.01"
315
+ },
316
+ {
317
+ "test name": "1,000,000 Set add",
318
+ "time taken (ms)": "175.15",
319
+ "executions per sec": "5.71",
320
+ "sample deviation": "0.02"
321
+ },
322
+ {
323
+ "test name": "1,000,000 set & get",
324
+ "time taken (ms)": "370.54",
325
+ "executions per sec": "2.70",
326
+ "sample deviation": "0.11"
327
+ },
328
+ {
329
+ "test name": "1,000,000 CPT set & get",
330
+ "time taken (ms)": "283.34",
331
+ "executions per sec": "3.53",
332
+ "sample deviation": "0.07"
333
+ },
334
+ {
335
+ "test name": "1,000,000 Map set & get",
336
+ "time taken (ms)": "287.09",
337
+ "executions per sec": "3.48",
338
+ "sample deviation": "0.04"
339
+ },
340
+ {
341
+ "test name": "1,000,000 Set add & has",
342
+ "time taken (ms)": "190.50",
343
+ "executions per sec": "5.25",
344
+ "sample deviation": "0.01"
345
+ },
346
+ {
347
+ "test name": "1,000,000 ObjKey set & get",
348
+ "time taken (ms)": "880.47",
349
+ "executions per sec": "1.14",
350
+ "sample deviation": "0.10"
351
+ },
352
+ {
353
+ "test name": "1,000,000 Map ObjKey set & get",
354
+ "time taken (ms)": "334.47",
355
+ "executions per sec": "2.99",
356
+ "sample deviation": "0.05"
357
+ },
358
+ {
359
+ "test name": "1,000,000 Set ObjKey add & has",
360
+ "time taken (ms)": "310.12",
361
+ "executions per sec": "3.22",
362
+ "sample deviation": "0.06"
363
+ }
364
+ ],
365
+ "testName": "hash-map"
366
+ },
2
367
  "heap": {
3
368
  "benchmarks": [
4
369
  {
5
370
  "test name": "100,000 add & pop",
6
- "time taken (ms)": "24.45",
7
- "executions per sec": "40.90",
371
+ "time taken (ms)": "80.13",
372
+ "executions per sec": "12.48",
8
373
  "sample deviation": "0.00"
9
374
  },
10
375
  {
11
376
  "test name": "100,000 add & dfs",
12
- "time taken (ms)": "32.55",
13
- "executions per sec": "30.72",
14
- "sample deviation": "6.11e-4"
377
+ "time taken (ms)": "35.08",
378
+ "executions per sec": "28.50",
379
+ "sample deviation": "0.00"
15
380
  },
16
381
  {
17
382
  "test name": "10,000 fib add & pop",
18
- "time taken (ms)": "347.99",
19
- "executions per sec": "2.87",
20
- "sample deviation": "0.00"
383
+ "time taken (ms)": "367.84",
384
+ "executions per sec": "2.72",
385
+ "sample deviation": "0.01"
21
386
  }
22
387
  ],
23
388
  "testName": "heap"
389
+ },
390
+ "doubly-linked-list": {
391
+ "benchmarks": [
392
+ {
393
+ "test name": "1,000,000 push",
394
+ "time taken (ms)": "237.28",
395
+ "executions per sec": "4.21",
396
+ "sample deviation": "0.07"
397
+ },
398
+ {
399
+ "test name": "1,000,000 CPT push",
400
+ "time taken (ms)": "75.66",
401
+ "executions per sec": "13.22",
402
+ "sample deviation": "0.03"
403
+ },
404
+ {
405
+ "test name": "1,000,000 unshift",
406
+ "time taken (ms)": "226.38",
407
+ "executions per sec": "4.42",
408
+ "sample deviation": "0.05"
409
+ },
410
+ {
411
+ "test name": "1,000,000 CPT unshift",
412
+ "time taken (ms)": "93.34",
413
+ "executions per sec": "10.71",
414
+ "sample deviation": "0.07"
415
+ },
416
+ {
417
+ "test name": "1,000,000 unshift & shift",
418
+ "time taken (ms)": "188.34",
419
+ "executions per sec": "5.31",
420
+ "sample deviation": "0.05"
421
+ },
422
+ {
423
+ "test name": "1,000,000 insertBefore",
424
+ "time taken (ms)": "329.60",
425
+ "executions per sec": "3.03",
426
+ "sample deviation": "0.05"
427
+ }
428
+ ],
429
+ "testName": "doubly-linked-list"
430
+ },
431
+ "singly-linked-list": {
432
+ "benchmarks": [
433
+ {
434
+ "test name": "10,000 push & pop",
435
+ "time taken (ms)": "221.32",
436
+ "executions per sec": "4.52",
437
+ "sample deviation": "0.01"
438
+ },
439
+ {
440
+ "test name": "10,000 insertBefore",
441
+ "time taken (ms)": "255.52",
442
+ "executions per sec": "3.91",
443
+ "sample deviation": "0.01"
444
+ }
445
+ ],
446
+ "testName": "singly-linked-list"
447
+ },
448
+ "max-priority-queue": {
449
+ "benchmarks": [
450
+ {
451
+ "test name": "10,000 refill & poll",
452
+ "time taken (ms)": "9.07",
453
+ "executions per sec": "110.24",
454
+ "sample deviation": "2.71e-4"
455
+ }
456
+ ],
457
+ "testName": "max-priority-queue"
458
+ },
459
+ "priority-queue": {
460
+ "benchmarks": [
461
+ {
462
+ "test name": "100,000 add & pop",
463
+ "time taken (ms)": "101.93",
464
+ "executions per sec": "9.81",
465
+ "sample deviation": "7.95e-4"
466
+ },
467
+ {
468
+ "test name": "100,000 CPT add & pop",
469
+ "time taken (ms)": "28.54",
470
+ "executions per sec": "35.04",
471
+ "sample deviation": "0.00"
472
+ }
473
+ ],
474
+ "testName": "priority-queue"
475
+ },
476
+ "deque": {
477
+ "benchmarks": [
478
+ {
479
+ "test name": "1,000,000 push",
480
+ "time taken (ms)": "14.43",
481
+ "executions per sec": "69.29",
482
+ "sample deviation": "2.36e-4"
483
+ },
484
+ {
485
+ "test name": "1,000,000 CPT push",
486
+ "time taken (ms)": "25.08",
487
+ "executions per sec": "39.87",
488
+ "sample deviation": "0.01"
489
+ },
490
+ {
491
+ "test name": "1,000,000 push & pop",
492
+ "time taken (ms)": "22.87",
493
+ "executions per sec": "43.72",
494
+ "sample deviation": "6.05e-4"
495
+ },
496
+ {
497
+ "test name": "1,000,000 push & shift",
498
+ "time taken (ms)": "25.28",
499
+ "executions per sec": "39.55",
500
+ "sample deviation": "0.01"
501
+ },
502
+ {
503
+ "test name": "1,000,000 unshift & shift",
504
+ "time taken (ms)": "21.88",
505
+ "executions per sec": "45.71",
506
+ "sample deviation": "2.05e-4"
507
+ }
508
+ ],
509
+ "testName": "deque"
510
+ },
511
+ "queue": {
512
+ "benchmarks": [
513
+ {
514
+ "test name": "1,000,000 push",
515
+ "time taken (ms)": "38.49",
516
+ "executions per sec": "25.98",
517
+ "sample deviation": "9.08e-4"
518
+ },
519
+ {
520
+ "test name": "1,000,000 CPT push",
521
+ "time taken (ms)": "43.93",
522
+ "executions per sec": "22.76",
523
+ "sample deviation": "0.01"
524
+ },
525
+ {
526
+ "test name": "1,000,000 push & shift",
527
+ "time taken (ms)": "82.85",
528
+ "executions per sec": "12.07",
529
+ "sample deviation": "0.00"
530
+ }
531
+ ],
532
+ "testName": "queue"
533
+ },
534
+ "stack": {
535
+ "benchmarks": [
536
+ {
537
+ "test name": "1,000,000 push",
538
+ "time taken (ms)": "40.19",
539
+ "executions per sec": "24.88",
540
+ "sample deviation": "0.01"
541
+ },
542
+ {
543
+ "test name": "1,000,000 CPT push",
544
+ "time taken (ms)": "39.87",
545
+ "executions per sec": "25.08",
546
+ "sample deviation": "0.00"
547
+ },
548
+ {
549
+ "test name": "1,000,000 push & pop",
550
+ "time taken (ms)": "41.67",
551
+ "executions per sec": "24.00",
552
+ "sample deviation": "0.01"
553
+ },
554
+ {
555
+ "test name": "1,000,000 CPT push & pop",
556
+ "time taken (ms)": "46.65",
557
+ "executions per sec": "21.44",
558
+ "sample deviation": "0.00"
559
+ }
560
+ ],
561
+ "testName": "stack"
562
+ },
563
+ "trie": {
564
+ "benchmarks": [
565
+ {
566
+ "test name": "100,000 push",
567
+ "time taken (ms)": "43.42",
568
+ "executions per sec": "23.03",
569
+ "sample deviation": "7.57e-4"
570
+ },
571
+ {
572
+ "test name": "100,000 getWords",
573
+ "time taken (ms)": "93.41",
574
+ "executions per sec": "10.71",
575
+ "sample deviation": "0.00"
576
+ }
577
+ ],
578
+ "testName": "trie"
24
579
  }
25
580
  }