data-structure-typed 1.51.5 → 1.51.7
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.
- package/CHANGELOG.md +3 -1
- package/README.md +17 -16
- package/benchmark/report.html +37 -1
- package/benchmark/report.json +405 -3
- package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js +1 -0
- package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js.map +1 -1
- package/dist/cjs/data-structures/binary-tree/avl-tree.js +0 -2
- package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +1 -1
- package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +2 -1
- package/dist/cjs/data-structures/binary-tree/binary-tree.js +24 -46
- package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +1 -1
- package/dist/cjs/data-structures/binary-tree/bst.d.ts +19 -19
- package/dist/cjs/data-structures/binary-tree/bst.js +59 -89
- package/dist/cjs/data-structures/binary-tree/bst.js.map +1 -1
- package/dist/cjs/data-structures/binary-tree/rb-tree.d.ts +10 -1
- package/dist/cjs/data-structures/binary-tree/rb-tree.js +19 -0
- package/dist/cjs/data-structures/binary-tree/rb-tree.js.map +1 -1
- package/dist/cjs/data-structures/binary-tree/tree-multi-map.js +1 -0
- package/dist/cjs/data-structures/binary-tree/tree-multi-map.js.map +1 -1
- package/dist/mjs/data-structures/binary-tree/avl-tree-multi-map.js +1 -0
- package/dist/mjs/data-structures/binary-tree/avl-tree.js +0 -2
- package/dist/mjs/data-structures/binary-tree/binary-tree.d.ts +2 -1
- package/dist/mjs/data-structures/binary-tree/binary-tree.js +23 -45
- package/dist/mjs/data-structures/binary-tree/bst.d.ts +19 -19
- package/dist/mjs/data-structures/binary-tree/bst.js +59 -89
- package/dist/mjs/data-structures/binary-tree/rb-tree.d.ts +10 -1
- package/dist/mjs/data-structures/binary-tree/rb-tree.js +19 -0
- package/dist/mjs/data-structures/binary-tree/tree-multi-map.js +1 -0
- package/dist/umd/data-structure-typed.js +98 -118
- package/dist/umd/data-structure-typed.min.js +2 -2
- package/dist/umd/data-structure-typed.min.js.map +1 -1
- package/package.json +6 -6
- package/src/data-structures/binary-tree/avl-tree-multi-map.ts +1 -0
- package/src/data-structures/binary-tree/avl-tree.ts +0 -1
- package/src/data-structures/binary-tree/binary-tree.ts +27 -38
- package/src/data-structures/binary-tree/bst.ts +59 -81
- package/src/data-structures/binary-tree/rb-tree.ts +19 -2
- package/src/data-structures/binary-tree/tree-multi-map.ts +1 -0
- package/test/performance/data-structures/binary-tree/binary-tree-overall.test.ts +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,9 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
9
9
|
- [`auto-changelog`](https://github.com/CookPete/auto-changelog)
|
|
10
10
|
|
|
11
|
-
## [v1.51.
|
|
11
|
+
## [v1.51.7](https://github.com/zrwusa/data-structure-typed/compare/v1.51.5...main) (upcoming)
|
|
12
|
+
|
|
13
|
+
## [v1.51.5](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...v1.51.5) (18 January 2024)
|
|
12
14
|
|
|
13
15
|
### Changes
|
|
14
16
|
|
package/README.md
CHANGED
|
@@ -178,6 +178,7 @@ We provide data structures that are not available in JS/TS
|
|
|
178
178
|
<th>Perf Test</th>
|
|
179
179
|
<th>API Doc</th>
|
|
180
180
|
<th>NPM</th>
|
|
181
|
+
<th>Downloads</th>
|
|
181
182
|
</tr>
|
|
182
183
|
</thead>
|
|
183
184
|
<tbody>
|
|
@@ -307,7 +308,7 @@ We provide data structures that are not available in JS/TS
|
|
|
307
308
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
308
309
|
<td><a href="https://data-structure-typed-docs.vercel.app/classes/HashMap.html"><span>View</span></a></td>
|
|
309
310
|
<td><a href="https://www.npmjs.com/package/hashmap-typed"><span></span></a></td>
|
|
310
|
-
<td
|
|
311
|
+
<td></td>
|
|
311
312
|
</tr>
|
|
312
313
|
<tr>
|
|
313
314
|
<td>Linked List</td>
|
|
@@ -347,7 +348,7 @@ We provide data structures that are not available in JS/TS
|
|
|
347
348
|
<td></td>
|
|
348
349
|
<td><a href="https://data-structure-typed-docs.vercel.app/classes/SegmentTree.html"><span>View</span></a></td>
|
|
349
350
|
<td><a href="https://www.npmjs.com/package/segment-tree-typed"><span></span></a></td>
|
|
350
|
-
<td
|
|
351
|
+
<td></td>
|
|
351
352
|
</tr>
|
|
352
353
|
<tr>
|
|
353
354
|
<td>Binary Indexed Tree</td>
|
|
@@ -355,7 +356,7 @@ We provide data structures that are not available in JS/TS
|
|
|
355
356
|
<td></td>
|
|
356
357
|
<td><a href="https://data-structure-typed-docs.vercel.app/classes/BinaryIndexedTree.html"><span>View</span></a></td>
|
|
357
358
|
<td><a href="https://www.npmjs.com/package/binary-indexed-tree-typed"><span></span></a></td>
|
|
358
|
-
<td
|
|
359
|
+
<td></td>
|
|
359
360
|
</tr>
|
|
360
361
|
</tbody>
|
|
361
362
|
</table>
|
|
@@ -735,43 +736,43 @@ Version 11.7.9
|
|
|
735
736
|
[//]: # (No deletion!!! Start of Replace Section)
|
|
736
737
|
<div class="json-to-html-collapse clearfix 0">
|
|
737
738
|
<div class='collapsible level0' ><span class='json-to-html-label'>heap</span></div>
|
|
738
|
-
<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>6.
|
|
739
|
+
<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>6.42</td><td>155.78</td><td>1.88e-4</td></tr><tr><td>100,000 add & poll</td><td>31.60</td><td>31.65</td><td>9.13e-4</td></tr></table></div>
|
|
739
740
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
740
741
|
<div class='collapsible level0' ><span class='json-to-html-label'>rb-tree</span></div>
|
|
741
|
-
<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>
|
|
742
|
+
<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>59.28</td><td>16.87</td><td>7.81e-4</td></tr><tr><td>100,000 add randomly</td><td>71.61</td><td>13.96</td><td>9.02e-4</td></tr><tr><td>100,000 get</td><td>104.13</td><td>9.60</td><td>0.00</td></tr><tr><td>100,000 iterator</td><td>27.03</td><td>37.00</td><td>0.00</td></tr><tr><td>100,000 add & delete orderly</td><td>126.42</td><td>7.91</td><td>0.00</td></tr><tr><td>100,000 add & delete randomly</td><td>214.36</td><td>4.66</td><td>0.00</td></tr></table></div>
|
|
742
743
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
743
744
|
<div class='collapsible level0' ><span class='json-to-html-label'>queue</span></div>
|
|
744
|
-
<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>
|
|
745
|
+
<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>44.98</td><td>22.23</td><td>0.01</td></tr><tr><td>100,000 push & shift</td><td>4.89</td><td>204.39</td><td>6.15e-4</td></tr><tr><td>Native JS Array 100,000 push & shift</td><td>2251.13</td><td>0.44</td><td>0.26</td></tr></table></div>
|
|
745
746
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
746
747
|
<div class='collapsible level0' ><span class='json-to-html-label'>deque</span></div>
|
|
747
|
-
<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>
|
|
748
|
+
<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>22.21</td><td>45.02</td><td>0.00</td></tr><tr><td>1,000,000 push & pop</td><td>30.97</td><td>32.29</td><td>0.00</td></tr><tr><td>1,000,000 push & shift</td><td>30.81</td><td>32.46</td><td>0.00</td></tr><tr><td>100,000 push & shift</td><td>3.24</td><td>308.25</td><td>2.08e-4</td></tr><tr><td>Native JS Array 100,000 push & shift</td><td>2279.95</td><td>0.44</td><td>0.21</td></tr><tr><td>100,000 unshift & shift</td><td>2.93</td><td>341.78</td><td>3.21e-4</td></tr><tr><td>Native JS Array 100,000 unshift & shift</td><td>4076.04</td><td>0.25</td><td>0.42</td></tr></table></div>
|
|
748
749
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
749
750
|
<div class='collapsible level0' ><span class='json-to-html-label'>hash-map</span></div>
|
|
750
|
-
<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>
|
|
751
|
+
<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>118.11</td><td>8.47</td><td>0.02</td></tr><tr><td>Native JS Map 1,000,000 set</td><td>206.18</td><td>4.85</td><td>0.01</td></tr><tr><td>Native JS Set 1,000,000 add</td><td>167.50</td><td>5.97</td><td>0.01</td></tr><tr><td>1,000,000 set & get</td><td>116.15</td><td>8.61</td><td>0.01</td></tr><tr><td>Native JS Map 1,000,000 set & get</td><td>269.11</td><td>3.72</td><td>0.02</td></tr><tr><td>Native JS Set 1,000,000 add & has</td><td>168.02</td><td>5.95</td><td>0.01</td></tr><tr><td>1,000,000 ObjKey set & get</td><td>335.36</td><td>2.98</td><td>0.04</td></tr><tr><td>Native JS Map 1,000,000 ObjKey set & get</td><td>327.78</td><td>3.05</td><td>0.06</td></tr><tr><td>Native JS Set 1,000,000 ObjKey add & has</td><td>281.64</td><td>3.55</td><td>0.04</td></tr></table></div>
|
|
751
752
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
752
753
|
<div class='collapsible level0' ><span class='json-to-html-label'>trie</span></div>
|
|
753
|
-
<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>
|
|
754
|
+
<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.64</td><td>22.91</td><td>8.01e-4</td></tr><tr><td>100,000 getWords</td><td>82.95</td><td>12.06</td><td>0.00</td></tr></table></div>
|
|
754
755
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
755
756
|
<div class='collapsible level0' ><span class='json-to-html-label'>avl-tree</span></div>
|
|
756
|
-
<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>
|
|
757
|
+
<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>263.01</td><td>3.80</td><td>0.02</td></tr><tr><td>100,000 add randomly</td><td>353.89</td><td>2.83</td><td>0.01</td></tr><tr><td>100,000 get</td><td>131.65</td><td>7.60</td><td>0.00</td></tr><tr><td>100,000 iterator</td><td>31.62</td><td>31.63</td><td>0.01</td></tr><tr><td>100,000 add & delete orderly</td><td>468.81</td><td>2.13</td><td>0.00</td></tr><tr><td>100,000 add & delete randomly</td><td>628.30</td><td>1.59</td><td>0.03</td></tr></table></div>
|
|
757
758
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
758
759
|
<div class='collapsible level0' ><span class='json-to-html-label'>binary-tree-overall</span></div>
|
|
759
|
-
<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.
|
|
760
|
+
<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 randomly</td><td>5.79</td><td>172.73</td><td>7.35e-5</td></tr><tr><td>10,000 RBTree get randomly</td><td>9.58</td><td>104.37</td><td>9.96e-5</td></tr><tr><td>10,000 RBTree add & delete randomly</td><td>17.82</td><td>56.12</td><td>1.90e-4</td></tr><tr><td>10,000 AVLTree add randomly</td><td>27.85</td><td>35.91</td><td>3.16e-4</td></tr><tr><td>10,000 AVLTree get randomly</td><td>10.73</td><td>93.19</td><td>6.38e-5</td></tr><tr><td>10,000 AVLTree add & delete randomly</td><td>48.98</td><td>20.42</td><td>3.91e-4</td></tr></table></div>
|
|
760
761
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
761
762
|
<div class='collapsible level0' ><span class='json-to-html-label'>directed-graph</span></div>
|
|
762
|
-
<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.
|
|
763
|
+
<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>9624.60</td><td>7.61e-7</td></tr><tr><td>1,000 addEdge</td><td>6.02</td><td>166.18</td><td>1.45e-4</td></tr><tr><td>1,000 getVertex</td><td>0.05</td><td>2.17e+4</td><td>3.52e-7</td></tr><tr><td>1,000 getEdge</td><td>23.88</td><td>41.88</td><td>0.00</td></tr><tr><td>tarjan</td><td>215.08</td><td>4.65</td><td>0.01</td></tr><tr><td>topologicalSort</td><td>187.83</td><td>5.32</td><td>0.00</td></tr></table></div>
|
|
763
764
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
764
765
|
<div class='collapsible level0' ><span class='json-to-html-label'>doubly-linked-list</span></div>
|
|
765
|
-
<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>
|
|
766
|
+
<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>221.69</td><td>4.51</td><td>0.03</td></tr><tr><td>1,000,000 unshift</td><td>227.33</td><td>4.40</td><td>0.07</td></tr><tr><td>1,000,000 unshift & shift</td><td>170.08</td><td>5.88</td><td>0.02</td></tr><tr><td>1,000,000 addBefore</td><td>321.29</td><td>3.11</td><td>0.07</td></tr></table></div>
|
|
766
767
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
767
768
|
<div class='collapsible level0' ><span class='json-to-html-label'>singly-linked-list</span></div>
|
|
768
|
-
<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>
|
|
769
|
+
<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>213.14</td><td>4.69</td><td>0.04</td></tr><tr><td>10,000 push & pop</td><td>217.84</td><td>4.59</td><td>0.01</td></tr><tr><td>10,000 addBefore</td><td>250.81</td><td>3.99</td><td>0.01</td></tr></table></div>
|
|
769
770
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
770
771
|
<div class='collapsible level0' ><span class='json-to-html-label'>priority-queue</span></div>
|
|
771
|
-
<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>
|
|
772
|
+
<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>26.91</td><td>37.16</td><td>1.96e-4</td></tr><tr><td>100,000 add & poll</td><td>75.09</td><td>13.32</td><td>5.04e-4</td></tr></table></div>
|
|
772
773
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
773
774
|
<div class='collapsible level0' ><span class='json-to-html-label'>stack</span></div>
|
|
774
|
-
<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>39.
|
|
775
|
+
<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>39.92</td><td>25.05</td><td>0.01</td></tr><tr><td>1,000,000 push & pop</td><td>48.08</td><td>20.80</td><td>0.01</td></tr></table></div>
|
|
775
776
|
</div>
|
|
776
777
|
|
|
777
778
|
[//]: # (No deletion!!! End of Replace Section)
|
package/benchmark/report.html
CHANGED
|
@@ -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'>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</td><td>6.42</td><td>155.78</td><td>1.88e-4</td></tr><tr><td>100,000 add & poll</td><td>31.60</td><td>31.65</td><td>9.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'>rb-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>100,000 add</td><td>59.28</td><td>16.87</td><td>7.81e-4</td></tr><tr><td>100,000 add randomly</td><td>71.61</td><td>13.96</td><td>9.02e-4</td></tr><tr><td>100,000 get</td><td>104.13</td><td>9.60</td><td>0.00</td></tr><tr><td>100,000 iterator</td><td>27.03</td><td>37.00</td><td>0.00</td></tr><tr><td>100,000 add & delete orderly</td><td>126.42</td><td>7.91</td><td>0.00</td></tr><tr><td>100,000 add & delete randomly</td><td>214.36</td><td>4.66</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'>queue</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>1,000,000 push</td><td>44.98</td><td>22.23</td><td>0.01</td></tr><tr><td>100,000 push & shift</td><td>4.89</td><td>204.39</td><td>6.15e-4</td></tr><tr><td>Native JS Array 100,000 push & shift</td><td>2251.13</td><td>0.44</td><td>0.26</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'>deque</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,000 push</td><td>22.21</td><td>45.02</td><td>0.00</td></tr><tr><td>1,000,000 push & pop</td><td>30.97</td><td>32.29</td><td>0.00</td></tr><tr><td>1,000,000 push & shift</td><td>30.81</td><td>32.46</td><td>0.00</td></tr><tr><td>100,000 push & shift</td><td>3.24</td><td>308.25</td><td>2.08e-4</td></tr><tr><td>Native JS Array 100,000 push & shift</td><td>2279.95</td><td>0.44</td><td>0.21</td></tr><tr><td>100,000 unshift & shift</td><td>2.93</td><td>341.78</td><td>3.21e-4</td></tr><tr><td>Native JS Array 100,000 unshift & shift</td><td>4076.04</td><td>0.25</td><td>0.42</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>118.11</td><td>8.47</td><td>0.02</td></tr><tr><td>Native JS Map 1,000,000 set</td><td>206.18</td><td>4.85</td><td>0.01</td></tr><tr><td>Native JS Set 1,000,000 add</td><td>167.50</td><td>5.97</td><td>0.01</td></tr><tr><td>1,000,000 set & get</td><td>116.15</td><td>8.61</td><td>0.01</td></tr><tr><td>Native JS Map 1,000,000 set & get</td><td>269.11</td><td>3.72</td><td>0.02</td></tr><tr><td>Native JS Set 1,000,000 add & has</td><td>168.02</td><td>5.95</td><td>0.01</td></tr><tr><td>1,000,000 ObjKey set & get</td><td>335.36</td><td>2.98</td><td>0.04</td></tr><tr><td>Native JS Map 1,000,000 ObjKey set & get</td><td>327.78</td><td>3.05</td><td>0.06</td></tr><tr><td>Native JS Set 1,000,000 ObjKey add & has</td><td>281.64</td><td>3.55</td><td>0.04</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'>trie</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 push</td><td>43.64</td><td>22.91</td><td>8.01e-4</td></tr><tr><td>100,000 getWords</td><td>82.95</td><td>12.06</td><td>0.00</td></tr></table></div>
|
|
62
|
+
</div><div class="json-to-html-collapse clearfix 0">
|
|
45
63
|
<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>100,000 add & delete orderly</td><td>
|
|
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>100,000 add</td><td>263.01</td><td>3.80</td><td>0.02</td></tr><tr><td>100,000 add randomly</td><td>353.89</td><td>2.83</td><td>0.01</td></tr><tr><td>100,000 get</td><td>131.65</td><td>7.60</td><td>0.00</td></tr><tr><td>100,000 iterator</td><td>31.62</td><td>31.63</td><td>0.01</td></tr><tr><td>100,000 add & delete orderly</td><td>468.81</td><td>2.13</td><td>0.00</td></tr><tr><td>100,000 add & delete randomly</td><td>628.30</td><td>1.59</td><td>0.03</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'>binary-tree-overall</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>10,000 RBTree add randomly</td><td>5.79</td><td>172.73</td><td>7.35e-5</td></tr><tr><td>10,000 RBTree get randomly</td><td>9.58</td><td>104.37</td><td>9.96e-5</td></tr><tr><td>10,000 RBTree add & delete randomly</td><td>17.82</td><td>56.12</td><td>1.90e-4</td></tr><tr><td>10,000 AVLTree add randomly</td><td>27.85</td><td>35.91</td><td>3.16e-4</td></tr><tr><td>10,000 AVLTree get randomly</td><td>10.73</td><td>93.19</td><td>6.38e-5</td></tr><tr><td>10,000 AVLTree add & delete randomly</td><td>48.98</td><td>20.42</td><td>3.91e-4</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'>directed-graph</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 addVertex</td><td>0.10</td><td>9624.60</td><td>7.61e-7</td></tr><tr><td>1,000 addEdge</td><td>6.02</td><td>166.18</td><td>1.45e-4</td></tr><tr><td>1,000 getVertex</td><td>0.05</td><td>2.17e+4</td><td>3.52e-7</td></tr><tr><td>1,000 getEdge</td><td>23.88</td><td>41.88</td><td>0.00</td></tr><tr><td>tarjan</td><td>215.08</td><td>4.65</td><td>0.01</td></tr><tr><td>topologicalSort</td><td>187.83</td><td>5.32</td><td>0.00</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'>doubly-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>1,000,000 push</td><td>221.69</td><td>4.51</td><td>0.03</td></tr><tr><td>1,000,000 unshift</td><td>227.33</td><td>4.40</td><td>0.07</td></tr><tr><td>1,000,000 unshift & shift</td><td>170.08</td><td>5.88</td><td>0.02</td></tr><tr><td>1,000,000 addBefore</td><td>321.29</td><td>3.11</td><td>0.07</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'>singly-linked-list</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 & shift</td><td>213.14</td><td>4.69</td><td>0.04</td></tr><tr><td>10,000 push & pop</td><td>217.84</td><td>4.59</td><td>0.01</td></tr><tr><td>10,000 addBefore</td><td>250.81</td><td>3.99</td><td>0.01</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</td><td>26.91</td><td>37.16</td><td>1.96e-4</td></tr><tr><td>100,000 add & poll</td><td>75.09</td><td>13.32</td><td>5.04e-4</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'>stack</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>39.92</td><td>25.05</td><td>0.01</td></tr><tr><td>1,000,000 push & pop</td><td>48.08</td><td>20.80</td><td>0.01</td></tr></table></div>
|
|
47
83
|
</div>
|
|
48
84
|
|
|
49
85
|
</div>
|