data-structure-typed 1.51.6 → 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 +1 -1
- package/README.md +13 -13
- 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 +4 -4
- 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,7 @@ 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
12
|
|
|
13
13
|
## [v1.51.5](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...v1.51.5) (18 January 2024)
|
|
14
14
|
|
package/README.md
CHANGED
|
@@ -736,43 +736,43 @@ Version 11.7.9
|
|
|
736
736
|
[//]: # (No deletion!!! Start of Replace Section)
|
|
737
737
|
<div class="json-to-html-collapse clearfix 0">
|
|
738
738
|
<div class='collapsible level0' ><span class='json-to-html-label'>heap</span></div>
|
|
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.
|
|
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>
|
|
740
740
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
741
741
|
<div class='collapsible level0' ><span class='json-to-html-label'>rb-tree</span></div>
|
|
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>
|
|
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>
|
|
743
743
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
744
744
|
<div class='collapsible level0' ><span class='json-to-html-label'>queue</span></div>
|
|
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>
|
|
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>
|
|
746
746
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
747
747
|
<div class='collapsible level0' ><span class='json-to-html-label'>deque</span></div>
|
|
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>
|
|
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>
|
|
749
749
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
750
750
|
<div class='collapsible level0' ><span class='json-to-html-label'>hash-map</span></div>
|
|
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>
|
|
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>
|
|
752
752
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
753
753
|
<div class='collapsible level0' ><span class='json-to-html-label'>trie</span></div>
|
|
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>
|
|
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>
|
|
755
755
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
756
756
|
<div class='collapsible level0' ><span class='json-to-html-label'>avl-tree</span></div>
|
|
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>
|
|
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>
|
|
758
758
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
759
759
|
<div class='collapsible level0' ><span class='json-to-html-label'>binary-tree-overall</span></div>
|
|
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</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>
|
|
761
761
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
762
762
|
<div class='collapsible level0' ><span class='json-to-html-label'>directed-graph</span></div>
|
|
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.
|
|
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>
|
|
764
764
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
765
765
|
<div class='collapsible level0' ><span class='json-to-html-label'>doubly-linked-list</span></div>
|
|
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>
|
|
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>
|
|
767
767
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
768
768
|
<div class='collapsible level0' ><span class='json-to-html-label'>singly-linked-list</span></div>
|
|
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>
|
|
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>
|
|
770
770
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
771
771
|
<div class='collapsible level0' ><span class='json-to-html-label'>priority-queue</span></div>
|
|
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>
|
|
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>
|
|
773
773
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
774
774
|
<div class='collapsible level0' ><span class='json-to-html-label'>stack</span></div>
|
|
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.
|
|
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>
|
|
776
776
|
</div>
|
|
777
777
|
|
|
778
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>
|
package/benchmark/report.json
CHANGED
|
@@ -1,13 +1,415 @@
|
|
|
1
1
|
{
|
|
2
|
+
"heap": {
|
|
3
|
+
"benchmarks": [
|
|
4
|
+
{
|
|
5
|
+
"test name": "100,000 add",
|
|
6
|
+
"time taken (ms)": "6.42",
|
|
7
|
+
"executions per sec": "155.78",
|
|
8
|
+
"sample deviation": "1.88e-4"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"test name": "100,000 add & poll",
|
|
12
|
+
"time taken (ms)": "31.60",
|
|
13
|
+
"executions per sec": "31.65",
|
|
14
|
+
"sample deviation": "9.13e-4"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"testName": "heap"
|
|
18
|
+
},
|
|
19
|
+
"rb-tree": {
|
|
20
|
+
"benchmarks": [
|
|
21
|
+
{
|
|
22
|
+
"test name": "100,000 add",
|
|
23
|
+
"time taken (ms)": "59.28",
|
|
24
|
+
"executions per sec": "16.87",
|
|
25
|
+
"sample deviation": "7.81e-4"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"test name": "100,000 add randomly",
|
|
29
|
+
"time taken (ms)": "71.61",
|
|
30
|
+
"executions per sec": "13.96",
|
|
31
|
+
"sample deviation": "9.02e-4"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"test name": "100,000 get",
|
|
35
|
+
"time taken (ms)": "104.13",
|
|
36
|
+
"executions per sec": "9.60",
|
|
37
|
+
"sample deviation": "0.00"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"test name": "100,000 iterator",
|
|
41
|
+
"time taken (ms)": "27.03",
|
|
42
|
+
"executions per sec": "37.00",
|
|
43
|
+
"sample deviation": "0.00"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"test name": "100,000 add & delete orderly",
|
|
47
|
+
"time taken (ms)": "126.42",
|
|
48
|
+
"executions per sec": "7.91",
|
|
49
|
+
"sample deviation": "0.00"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"test name": "100,000 add & delete randomly",
|
|
53
|
+
"time taken (ms)": "214.36",
|
|
54
|
+
"executions per sec": "4.66",
|
|
55
|
+
"sample deviation": "0.00"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"testName": "rb-tree"
|
|
59
|
+
},
|
|
60
|
+
"queue": {
|
|
61
|
+
"benchmarks": [
|
|
62
|
+
{
|
|
63
|
+
"test name": "1,000,000 push",
|
|
64
|
+
"time taken (ms)": "44.98",
|
|
65
|
+
"executions per sec": "22.23",
|
|
66
|
+
"sample deviation": "0.01"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"test name": "100,000 push & shift",
|
|
70
|
+
"time taken (ms)": "4.89",
|
|
71
|
+
"executions per sec": "204.39",
|
|
72
|
+
"sample deviation": "6.15e-4"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"test name": "Native JS Array 100,000 push & shift",
|
|
76
|
+
"time taken (ms)": "2251.13",
|
|
77
|
+
"executions per sec": "0.44",
|
|
78
|
+
"sample deviation": "0.26"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"testName": "queue"
|
|
82
|
+
},
|
|
83
|
+
"deque": {
|
|
84
|
+
"benchmarks": [
|
|
85
|
+
{
|
|
86
|
+
"test name": "1,000,000 push",
|
|
87
|
+
"time taken (ms)": "22.21",
|
|
88
|
+
"executions per sec": "45.02",
|
|
89
|
+
"sample deviation": "0.00"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"test name": "1,000,000 push & pop",
|
|
93
|
+
"time taken (ms)": "30.97",
|
|
94
|
+
"executions per sec": "32.29",
|
|
95
|
+
"sample deviation": "0.00"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"test name": "1,000,000 push & shift",
|
|
99
|
+
"time taken (ms)": "30.81",
|
|
100
|
+
"executions per sec": "32.46",
|
|
101
|
+
"sample deviation": "0.00"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"test name": "100,000 push & shift",
|
|
105
|
+
"time taken (ms)": "3.24",
|
|
106
|
+
"executions per sec": "308.25",
|
|
107
|
+
"sample deviation": "2.08e-4"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"test name": "Native JS Array 100,000 push & shift",
|
|
111
|
+
"time taken (ms)": "2279.95",
|
|
112
|
+
"executions per sec": "0.44",
|
|
113
|
+
"sample deviation": "0.21"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"test name": "100,000 unshift & shift",
|
|
117
|
+
"time taken (ms)": "2.93",
|
|
118
|
+
"executions per sec": "341.78",
|
|
119
|
+
"sample deviation": "3.21e-4"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"test name": "Native JS Array 100,000 unshift & shift",
|
|
123
|
+
"time taken (ms)": "4076.04",
|
|
124
|
+
"executions per sec": "0.25",
|
|
125
|
+
"sample deviation": "0.42"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"testName": "deque"
|
|
129
|
+
},
|
|
130
|
+
"hash-map": {
|
|
131
|
+
"benchmarks": [
|
|
132
|
+
{
|
|
133
|
+
"test name": "1,000,000 set",
|
|
134
|
+
"time taken (ms)": "118.11",
|
|
135
|
+
"executions per sec": "8.47",
|
|
136
|
+
"sample deviation": "0.02"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"test name": "Native JS Map 1,000,000 set",
|
|
140
|
+
"time taken (ms)": "206.18",
|
|
141
|
+
"executions per sec": "4.85",
|
|
142
|
+
"sample deviation": "0.01"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"test name": "Native JS Set 1,000,000 add",
|
|
146
|
+
"time taken (ms)": "167.50",
|
|
147
|
+
"executions per sec": "5.97",
|
|
148
|
+
"sample deviation": "0.01"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"test name": "1,000,000 set & get",
|
|
152
|
+
"time taken (ms)": "116.15",
|
|
153
|
+
"executions per sec": "8.61",
|
|
154
|
+
"sample deviation": "0.01"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"test name": "Native JS Map 1,000,000 set & get",
|
|
158
|
+
"time taken (ms)": "269.11",
|
|
159
|
+
"executions per sec": "3.72",
|
|
160
|
+
"sample deviation": "0.02"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"test name": "Native JS Set 1,000,000 add & has",
|
|
164
|
+
"time taken (ms)": "168.02",
|
|
165
|
+
"executions per sec": "5.95",
|
|
166
|
+
"sample deviation": "0.01"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"test name": "1,000,000 ObjKey set & get",
|
|
170
|
+
"time taken (ms)": "335.36",
|
|
171
|
+
"executions per sec": "2.98",
|
|
172
|
+
"sample deviation": "0.04"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"test name": "Native JS Map 1,000,000 ObjKey set & get",
|
|
176
|
+
"time taken (ms)": "327.78",
|
|
177
|
+
"executions per sec": "3.05",
|
|
178
|
+
"sample deviation": "0.06"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"test name": "Native JS Set 1,000,000 ObjKey add & has",
|
|
182
|
+
"time taken (ms)": "281.64",
|
|
183
|
+
"executions per sec": "3.55",
|
|
184
|
+
"sample deviation": "0.04"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"testName": "hash-map"
|
|
188
|
+
},
|
|
189
|
+
"trie": {
|
|
190
|
+
"benchmarks": [
|
|
191
|
+
{
|
|
192
|
+
"test name": "100,000 push",
|
|
193
|
+
"time taken (ms)": "43.64",
|
|
194
|
+
"executions per sec": "22.91",
|
|
195
|
+
"sample deviation": "8.01e-4"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"test name": "100,000 getWords",
|
|
199
|
+
"time taken (ms)": "82.95",
|
|
200
|
+
"executions per sec": "12.06",
|
|
201
|
+
"sample deviation": "0.00"
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"testName": "trie"
|
|
205
|
+
},
|
|
2
206
|
"avl-tree": {
|
|
3
207
|
"benchmarks": [
|
|
208
|
+
{
|
|
209
|
+
"test name": "100,000 add",
|
|
210
|
+
"time taken (ms)": "263.01",
|
|
211
|
+
"executions per sec": "3.80",
|
|
212
|
+
"sample deviation": "0.02"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"test name": "100,000 add randomly",
|
|
216
|
+
"time taken (ms)": "353.89",
|
|
217
|
+
"executions per sec": "2.83",
|
|
218
|
+
"sample deviation": "0.01"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"test name": "100,000 get",
|
|
222
|
+
"time taken (ms)": "131.65",
|
|
223
|
+
"executions per sec": "7.60",
|
|
224
|
+
"sample deviation": "0.00"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"test name": "100,000 iterator",
|
|
228
|
+
"time taken (ms)": "31.62",
|
|
229
|
+
"executions per sec": "31.63",
|
|
230
|
+
"sample deviation": "0.01"
|
|
231
|
+
},
|
|
4
232
|
{
|
|
5
233
|
"test name": "100,000 add & delete orderly",
|
|
6
|
-
"time taken (ms)": "
|
|
7
|
-
"executions per sec": "
|
|
8
|
-
"sample deviation": "0.
|
|
234
|
+
"time taken (ms)": "468.81",
|
|
235
|
+
"executions per sec": "2.13",
|
|
236
|
+
"sample deviation": "0.00"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"test name": "100,000 add & delete randomly",
|
|
240
|
+
"time taken (ms)": "628.30",
|
|
241
|
+
"executions per sec": "1.59",
|
|
242
|
+
"sample deviation": "0.03"
|
|
9
243
|
}
|
|
10
244
|
],
|
|
11
245
|
"testName": "avl-tree"
|
|
246
|
+
},
|
|
247
|
+
"binary-tree-overall": {
|
|
248
|
+
"benchmarks": [
|
|
249
|
+
{
|
|
250
|
+
"test name": "10,000 RBTree add randomly",
|
|
251
|
+
"time taken (ms)": "5.79",
|
|
252
|
+
"executions per sec": "172.73",
|
|
253
|
+
"sample deviation": "7.35e-5"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"test name": "10,000 RBTree get randomly",
|
|
257
|
+
"time taken (ms)": "9.58",
|
|
258
|
+
"executions per sec": "104.37",
|
|
259
|
+
"sample deviation": "9.96e-5"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"test name": "10,000 RBTree add & delete randomly",
|
|
263
|
+
"time taken (ms)": "17.82",
|
|
264
|
+
"executions per sec": "56.12",
|
|
265
|
+
"sample deviation": "1.90e-4"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"test name": "10,000 AVLTree add randomly",
|
|
269
|
+
"time taken (ms)": "27.85",
|
|
270
|
+
"executions per sec": "35.91",
|
|
271
|
+
"sample deviation": "3.16e-4"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"test name": "10,000 AVLTree get randomly",
|
|
275
|
+
"time taken (ms)": "10.73",
|
|
276
|
+
"executions per sec": "93.19",
|
|
277
|
+
"sample deviation": "6.38e-5"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"test name": "10,000 AVLTree add & delete randomly",
|
|
281
|
+
"time taken (ms)": "48.98",
|
|
282
|
+
"executions per sec": "20.42",
|
|
283
|
+
"sample deviation": "3.91e-4"
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"testName": "binary-tree-overall"
|
|
287
|
+
},
|
|
288
|
+
"directed-graph": {
|
|
289
|
+
"benchmarks": [
|
|
290
|
+
{
|
|
291
|
+
"test name": "1,000 addVertex",
|
|
292
|
+
"time taken (ms)": "0.10",
|
|
293
|
+
"executions per sec": "9624.60",
|
|
294
|
+
"sample deviation": "7.61e-7"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"test name": "1,000 addEdge",
|
|
298
|
+
"time taken (ms)": "6.02",
|
|
299
|
+
"executions per sec": "166.18",
|
|
300
|
+
"sample deviation": "1.45e-4"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"test name": "1,000 getVertex",
|
|
304
|
+
"time taken (ms)": "0.05",
|
|
305
|
+
"executions per sec": "2.17e+4",
|
|
306
|
+
"sample deviation": "3.52e-7"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"test name": "1,000 getEdge",
|
|
310
|
+
"time taken (ms)": "23.88",
|
|
311
|
+
"executions per sec": "41.88",
|
|
312
|
+
"sample deviation": "0.00"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"test name": "tarjan",
|
|
316
|
+
"time taken (ms)": "215.08",
|
|
317
|
+
"executions per sec": "4.65",
|
|
318
|
+
"sample deviation": "0.01"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"test name": "topologicalSort",
|
|
322
|
+
"time taken (ms)": "187.83",
|
|
323
|
+
"executions per sec": "5.32",
|
|
324
|
+
"sample deviation": "0.00"
|
|
325
|
+
}
|
|
326
|
+
],
|
|
327
|
+
"testName": "directed-graph"
|
|
328
|
+
},
|
|
329
|
+
"doubly-linked-list": {
|
|
330
|
+
"benchmarks": [
|
|
331
|
+
{
|
|
332
|
+
"test name": "1,000,000 push",
|
|
333
|
+
"time taken (ms)": "221.69",
|
|
334
|
+
"executions per sec": "4.51",
|
|
335
|
+
"sample deviation": "0.03"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"test name": "1,000,000 unshift",
|
|
339
|
+
"time taken (ms)": "227.33",
|
|
340
|
+
"executions per sec": "4.40",
|
|
341
|
+
"sample deviation": "0.07"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"test name": "1,000,000 unshift & shift",
|
|
345
|
+
"time taken (ms)": "170.08",
|
|
346
|
+
"executions per sec": "5.88",
|
|
347
|
+
"sample deviation": "0.02"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"test name": "1,000,000 addBefore",
|
|
351
|
+
"time taken (ms)": "321.29",
|
|
352
|
+
"executions per sec": "3.11",
|
|
353
|
+
"sample deviation": "0.07"
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
"testName": "doubly-linked-list"
|
|
357
|
+
},
|
|
358
|
+
"singly-linked-list": {
|
|
359
|
+
"benchmarks": [
|
|
360
|
+
{
|
|
361
|
+
"test name": "1,000,000 push & shift",
|
|
362
|
+
"time taken (ms)": "213.14",
|
|
363
|
+
"executions per sec": "4.69",
|
|
364
|
+
"sample deviation": "0.04"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"test name": "10,000 push & pop",
|
|
368
|
+
"time taken (ms)": "217.84",
|
|
369
|
+
"executions per sec": "4.59",
|
|
370
|
+
"sample deviation": "0.01"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"test name": "10,000 addBefore",
|
|
374
|
+
"time taken (ms)": "250.81",
|
|
375
|
+
"executions per sec": "3.99",
|
|
376
|
+
"sample deviation": "0.01"
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
"testName": "singly-linked-list"
|
|
380
|
+
},
|
|
381
|
+
"priority-queue": {
|
|
382
|
+
"benchmarks": [
|
|
383
|
+
{
|
|
384
|
+
"test name": "100,000 add",
|
|
385
|
+
"time taken (ms)": "26.91",
|
|
386
|
+
"executions per sec": "37.16",
|
|
387
|
+
"sample deviation": "1.96e-4"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"test name": "100,000 add & poll",
|
|
391
|
+
"time taken (ms)": "75.09",
|
|
392
|
+
"executions per sec": "13.32",
|
|
393
|
+
"sample deviation": "5.04e-4"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"testName": "priority-queue"
|
|
397
|
+
},
|
|
398
|
+
"stack": {
|
|
399
|
+
"benchmarks": [
|
|
400
|
+
{
|
|
401
|
+
"test name": "1,000,000 push",
|
|
402
|
+
"time taken (ms)": "39.92",
|
|
403
|
+
"executions per sec": "25.05",
|
|
404
|
+
"sample deviation": "0.01"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"test name": "1,000,000 push & pop",
|
|
408
|
+
"time taken (ms)": "48.08",
|
|
409
|
+
"executions per sec": "20.80",
|
|
410
|
+
"sample deviation": "0.01"
|
|
411
|
+
}
|
|
412
|
+
],
|
|
413
|
+
"testName": "stack"
|
|
12
414
|
}
|
|
13
415
|
}
|
|
@@ -199,6 +199,7 @@ class AVLTreeMultiMap extends avl_tree_1.AVLTree {
|
|
|
199
199
|
const deletedResult = [];
|
|
200
200
|
if (!this.root)
|
|
201
201
|
return deletedResult;
|
|
202
|
+
callback = this._ensureCallback(identifier, callback);
|
|
202
203
|
const curr = (_a = this.getNode(identifier, callback)) !== null && _a !== void 0 ? _a : undefined;
|
|
203
204
|
if (!curr)
|
|
204
205
|
return deletedResult;
|