data-structure-typed 1.41.4 → 1.41.5

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.
@@ -43,31 +43,37 @@
43
43
  <body>
44
44
  <div id="json-to-html"><div class="json-to-html-collapse clearfix 0">
45
45
  <div class='collapsible level0' ><span class='json-to-html-label'>avl-tree</span></div>
46
- <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>add 1000 randomly</td><td>2.08</td><td>479.69</td><td>25</td><td>0.00</td><td>2.14e-5</td></tr><tr><td>delete 1000 randomly</td><td>0.05</td><td>1.82e+4</td><td>924</td><td>5.49e-5</td><td>4.16e-7</td></tr><tr><td>addMany 1000</td><td>2.88</td><td>347.21</td><td>18</td><td>0.00</td><td>2.69e-5</td></tr><tr><td>get 1000</td><td>52.72</td><td>18.97</td><td>1</td><td>0.05</td><td>0.00</td></tr></table></div>
46
+ <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>1000 add randomly</td><td>2.22</td><td>449.77</td><td>23</td><td>0.00</td><td>2.65e-5</td></tr><tr><td>1000 add & delete randomly</td><td>11.58</td><td>86.37</td><td>5</td><td>0.01</td><td>5.00e-4</td></tr><tr><td>1000 addMany</td><td>3.10</td><td>322.62</td><td>17</td><td>0.00</td><td>1.23e-4</td></tr><tr><td>1000 get</td><td>24.91</td><td>40.14</td><td>3</td><td>0.02</td><td>7.25e-4</td></tr></table></div>
47
47
  </div><div class="json-to-html-collapse clearfix 0">
48
48
  <div class='collapsible level0' ><span class='json-to-html-label'>binary-tree</span></div>
49
- <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>add 1000</td><td>65.05</td><td>15.37</td><td>3</td><td>0.07</td><td>0.00</td></tr><tr><td>delete 1000</td><td>26.26</td><td>38.08</td><td>1104</td><td>0.03</td><td>0.04</td></tr><tr><td>addMany 1000</td><td>8.81</td><td>113.44</td><td>6</td><td>0.01</td><td>9.78e-5</td></tr><tr><td>get 1000</td><td>31.44</td><td>31.80</td><td>2</td><td>0.03</td><td>3.59e-4</td></tr></table></div>
49
+ <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>1000 add randomly</td><td>13.05</td><td>76.62</td><td>5</td><td>0.01</td><td>3.58e-4</td></tr><tr><td>1000 add & delete randomly</td><td>15.76</td><td>63.44</td><td>4</td><td>0.02</td><td>1.24e-4</td></tr><tr><td>1000 addMany</td><td>10.67</td><td>93.68</td><td>5</td><td>0.01</td><td>6.84e-4</td></tr><tr><td>1000 get</td><td>23.72</td><td>42.15</td><td>3</td><td>0.02</td><td>2.74e-4</td></tr><tr><td>1000 dfs</td><td>72.32</td><td>13.83</td><td>1</td><td>0.07</td><td>7.21e-4</td></tr><tr><td>1000 bfs</td><td>54.98</td><td>18.19</td><td>1</td><td>0.05</td><td>6.62e-4</td></tr><tr><td>1000 morris</td><td>37.33</td><td>26.79</td><td>2</td><td>0.04</td><td>3.72e-4</td></tr></table></div>
50
50
  </div><div class="json-to-html-collapse clearfix 0">
51
51
  <div class='collapsible level0' ><span class='json-to-html-label'>bst</span></div>
52
- <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>add 1000 randomly</td><td>2.04</td><td>490.04</td><td>25</td><td>0.00</td><td>2.37e-5</td></tr><tr><td>delete 1000 randomly</td><td>0.04</td><td>2.23e+4</td><td>1137</td><td>4.48e-5</td><td>6.04e-7</td></tr><tr><td>addMany 1000 balanced</td><td>2.67</td><td>375.13</td><td>20</td><td>0.00</td><td>2.64e-4</td></tr><tr><td>get 1000</td><td>62.25</td><td>16.06</td><td>1</td><td>0.06</td><td>0.00</td></tr></table></div>
52
+ <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>1000 add randomly</td><td>2.34</td><td>427.09</td><td>22</td><td>0.00</td><td>2.19e-5</td></tr><tr><td>1000 add & delete randomly</td><td>13.21</td><td>75.70</td><td>4</td><td>0.01</td><td>3.61e-4</td></tr><tr><td>1000 addMany</td><td>2.23</td><td>449.06</td><td>24</td><td>0.00</td><td>4.38e-5</td></tr><tr><td>1000 get</td><td>25.81</td><td>38.75</td><td>2</td><td>0.03</td><td>6.13e-4</td></tr></table></div>
53
+ </div><div class="json-to-html-collapse clearfix 0">
54
+ <div class='collapsible level0' ><span class='json-to-html-label'>directed-graph</span></div>
55
+ <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>1000 addVertex</td><td>0.10</td><td>9761.68</td><td>498</td><td>1.02e-4</td><td>1.73e-6</td></tr><tr><td>1000 addEdge</td><td>6.40</td><td>156.27</td><td>9</td><td>0.01</td><td>5.45e-4</td></tr><tr><td>1000 getVertex</td><td>0.05</td><td>2.17e+4</td><td>1094</td><td>4.61e-5</td><td>2.85e-7</td></tr><tr><td>1000 getEdge</td><td>22.10</td><td>45.25</td><td>3</td><td>0.02</td><td>0.00</td></tr><tr><td>tarjan</td><td>209.19</td><td>4.78</td><td>1</td><td>0.21</td><td>0.01</td></tr><tr><td>tarjan all</td><td>211.22</td><td>4.73</td><td>1</td><td>0.21</td><td>0.00</td></tr><tr><td>topologicalSort</td><td>170.38</td><td>5.87</td><td>1</td><td>0.17</td><td>0.00</td></tr></table></div>
53
56
  </div><div class="json-to-html-collapse clearfix 0">
54
57
  <div class='collapsible level0' ><span class='json-to-html-label'>heap</span></div>
55
- <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>add & 1000</td><td>0.34</td><td>2919.71</td><td>149</td><td>3.43e-4</td><td>4.56e-6</td></tr><tr><td>fib add & pop 1000</td><td>3.88</td><td>257.61</td><td>14</td><td>0.00</td><td>4.79e-5</td></tr></table></div>
58
+ <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>1000 add & pop</td><td>0.34</td><td>2921.82</td><td>149</td><td>3.42e-4</td><td>3.19e-6</td></tr><tr><td>1000 fib add & pop</td><td>3.93</td><td>254.62</td><td>14</td><td>0.00</td><td>7.82e-5</td></tr></table></div>
56
59
  </div><div class="json-to-html-collapse clearfix 0">
57
60
  <div class='collapsible level0' ><span class='json-to-html-label'>doubly-linked-list</span></div>
58
- <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>unshift 1000000</td><td>202.43</td><td>4.94</td><td>1</td><td>0.20</td><td>0.02</td></tr><tr><td>unshift & shift 1000000</td><td>158.09</td><td>6.33</td><td>1</td><td>0.16</td><td>0.03</td></tr><tr><td>insertBefore 1000</td><td>0.03</td><td>3.75e+4</td><td>1922</td><td>2.67e-5</td><td>4.57e-7</td></tr></table></div>
61
+ <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>1000000 unshift</td><td>218.29</td><td>4.58</td><td>1</td><td>0.22</td><td>0.07</td></tr><tr><td>1000000 unshift & shift</td><td>168.88</td><td>5.92</td><td>1</td><td>0.17</td><td>0.03</td></tr><tr><td>1000 insertBefore</td><td>0.03</td><td>3.72e+4</td><td>1904</td><td>2.69e-5</td><td>4.13e-7</td></tr></table></div>
59
62
  </div><div class="json-to-html-collapse clearfix 0">
60
63
  <div class='collapsible level0' ><span class='json-to-html-label'>singly-linked-list</span></div>
61
- <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>push & pop 1000</td><td>1.77</td><td>564.48</td><td>30</td><td>0.00</td><td>7.71e-5</td></tr><tr><td>insertBefore 1000</td><td>2.29</td><td>435.77</td><td>22</td><td>0.00</td><td>3.74e-5</td></tr></table></div>
64
+ <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>1000 push & pop</td><td>1.77</td><td>564.34</td><td>30</td><td>0.00</td><td>5.91e-5</td></tr><tr><td>1000 insertBefore</td><td>2.31</td><td>432.88</td><td>22</td><td>0.00</td><td>5.53e-5</td></tr></table></div>
62
65
  </div><div class="json-to-html-collapse clearfix 0">
63
66
  <div class='collapsible level0' ><span class='json-to-html-label'>max-priority-queue</span></div>
64
- <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>refill & poll 1000000</td><td>1812.54</td><td>0.55</td><td>1</td><td>1.81</td><td>0.02</td></tr></table></div>
67
+ <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>10000 refill & poll</td><td>11.42</td><td>87.54</td><td>5</td><td>0.01</td><td>1.63e-4</td></tr></table></div>
65
68
  </div><div class="json-to-html-collapse clearfix 0">
66
69
  <div class='collapsible level0' ><span class='json-to-html-label'>deque</span></div>
67
- <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>push 1000000</td><td>205.83</td><td>4.86</td><td>1</td><td>0.21</td><td>0.03</td></tr><tr><td>shift 1000000</td><td>24.78</td><td>40.35</td><td>3</td><td>0.02</td><td>0.00</td></tr></table></div>
70
+ <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>1000000 push</td><td>223.27</td><td>4.48</td><td>1</td><td>0.22</td><td>0.03</td></tr><tr><td>1000000 shift</td><td>24.66</td><td>40.55</td><td>3</td><td>0.02</td><td>0.00</td></tr></table></div>
68
71
  </div><div class="json-to-html-collapse clearfix 0">
69
72
  <div class='collapsible level0' ><span class='json-to-html-label'>queue</span></div>
70
- <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>push 1000000</td><td>42.29</td><td>23.65</td><td>2</td><td>0.04</td><td>0.01</td></tr><tr><td>push & shift 1000000</td><td>78.34</td><td>12.77</td><td>1</td><td>0.08</td><td>0.00</td></tr></table></div>
73
+ <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>1000000 push</td><td>43.10</td><td>23.20</td><td>2</td><td>0.04</td><td>0.01</td></tr><tr><td>1000000 push & shift</td><td>79.89</td><td>12.52</td><td>1</td><td>0.08</td><td>0.00</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'>trie</span></div>
76
+ <div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>executed times</th><th>sample mean (secs)</th><th>sample deviation</th></tr><tr><td>100000 push</td><td>54.81</td><td>18.24</td><td>1</td><td>0.05</td><td>0.00</td></tr><tr><td>100000 getWords</td><td>94.93</td><td>10.53</td><td>1</td><td>0.09</td><td>0.01</td></tr></table></div>
71
77
  </div></div>
72
78
  </body>
73
79
  </html>
@@ -2,36 +2,36 @@
2
2
  "avl-tree": {
3
3
  "benchmarks": [
4
4
  {
5
- "test name": "add 1000 randomly",
6
- "time taken (ms)": "2.08",
7
- "executions per sec": "479.69",
8
- "executed times": "25",
5
+ "test name": "1000 add randomly",
6
+ "time taken (ms)": "2.22",
7
+ "executions per sec": "449.77",
8
+ "executed times": "23",
9
9
  "sample mean (secs)": "0.00",
10
- "sample deviation": "2.14e-5"
10
+ "sample deviation": "2.65e-5"
11
11
  },
12
12
  {
13
- "test name": "delete 1000 randomly",
14
- "time taken (ms)": "0.05",
15
- "executions per sec": "1.82e+4",
16
- "executed times": "924",
17
- "sample mean (secs)": "5.49e-5",
18
- "sample deviation": "4.16e-7"
13
+ "test name": "1000 add & delete randomly",
14
+ "time taken (ms)": "11.58",
15
+ "executions per sec": "86.37",
16
+ "executed times": "5",
17
+ "sample mean (secs)": "0.01",
18
+ "sample deviation": "5.00e-4"
19
19
  },
20
20
  {
21
- "test name": "addMany 1000",
22
- "time taken (ms)": "2.88",
23
- "executions per sec": "347.21",
24
- "executed times": "18",
21
+ "test name": "1000 addMany",
22
+ "time taken (ms)": "3.10",
23
+ "executions per sec": "322.62",
24
+ "executed times": "17",
25
25
  "sample mean (secs)": "0.00",
26
- "sample deviation": "2.69e-5"
26
+ "sample deviation": "1.23e-4"
27
27
  },
28
28
  {
29
- "test name": "get 1000",
30
- "time taken (ms)": "52.72",
31
- "executions per sec": "18.97",
32
- "executed times": "1",
33
- "sample mean (secs)": "0.05",
34
- "sample deviation": "0.00"
29
+ "test name": "1000 get",
30
+ "time taken (ms)": "24.91",
31
+ "executions per sec": "40.14",
32
+ "executed times": "3",
33
+ "sample mean (secs)": "0.02",
34
+ "sample deviation": "7.25e-4"
35
35
  }
36
36
  ],
37
37
  "testName": "avl-tree"
@@ -39,36 +39,60 @@
39
39
  "binary-tree": {
40
40
  "benchmarks": [
41
41
  {
42
- "test name": "add 1000",
43
- "time taken (ms)": "65.05",
44
- "executions per sec": "15.37",
45
- "executed times": "3",
46
- "sample mean (secs)": "0.07",
47
- "sample deviation": "0.00"
42
+ "test name": "1000 add randomly",
43
+ "time taken (ms)": "13.05",
44
+ "executions per sec": "76.62",
45
+ "executed times": "5",
46
+ "sample mean (secs)": "0.01",
47
+ "sample deviation": "3.58e-4"
48
48
  },
49
49
  {
50
- "test name": "delete 1000",
51
- "time taken (ms)": "26.26",
52
- "executions per sec": "38.08",
53
- "executed times": "1104",
54
- "sample mean (secs)": "0.03",
55
- "sample deviation": "0.04"
50
+ "test name": "1000 add & delete randomly",
51
+ "time taken (ms)": "15.76",
52
+ "executions per sec": "63.44",
53
+ "executed times": "4",
54
+ "sample mean (secs)": "0.02",
55
+ "sample deviation": "1.24e-4"
56
56
  },
57
57
  {
58
- "test name": "addMany 1000",
59
- "time taken (ms)": "8.81",
60
- "executions per sec": "113.44",
61
- "executed times": "6",
58
+ "test name": "1000 addMany",
59
+ "time taken (ms)": "10.67",
60
+ "executions per sec": "93.68",
61
+ "executed times": "5",
62
62
  "sample mean (secs)": "0.01",
63
- "sample deviation": "9.78e-5"
63
+ "sample deviation": "6.84e-4"
64
+ },
65
+ {
66
+ "test name": "1000 get",
67
+ "time taken (ms)": "23.72",
68
+ "executions per sec": "42.15",
69
+ "executed times": "3",
70
+ "sample mean (secs)": "0.02",
71
+ "sample deviation": "2.74e-4"
72
+ },
73
+ {
74
+ "test name": "1000 dfs",
75
+ "time taken (ms)": "72.32",
76
+ "executions per sec": "13.83",
77
+ "executed times": "1",
78
+ "sample mean (secs)": "0.07",
79
+ "sample deviation": "7.21e-4"
80
+ },
81
+ {
82
+ "test name": "1000 bfs",
83
+ "time taken (ms)": "54.98",
84
+ "executions per sec": "18.19",
85
+ "executed times": "1",
86
+ "sample mean (secs)": "0.05",
87
+ "sample deviation": "6.62e-4"
64
88
  },
65
89
  {
66
- "test name": "get 1000",
67
- "time taken (ms)": "31.44",
68
- "executions per sec": "31.80",
90
+ "test name": "1000 morris",
91
+ "time taken (ms)": "37.33",
92
+ "executions per sec": "26.79",
69
93
  "executed times": "2",
70
- "sample mean (secs)": "0.03",
71
- "sample deviation": "3.59e-4"
94
+ "sample mean (secs)": "0.04",
95
+ "sample deviation": "3.72e-4"
72
96
  }
73
97
  ],
74
98
  "testName": "binary-tree"
@@ -76,57 +100,118 @@
76
100
  "bst": {
77
101
  "benchmarks": [
78
102
  {
79
- "test name": "add 1000 randomly",
80
- "time taken (ms)": "2.04",
81
- "executions per sec": "490.04",
82
- "executed times": "25",
103
+ "test name": "1000 add randomly",
104
+ "time taken (ms)": "2.34",
105
+ "executions per sec": "427.09",
106
+ "executed times": "22",
83
107
  "sample mean (secs)": "0.00",
84
- "sample deviation": "2.37e-5"
108
+ "sample deviation": "2.19e-5"
85
109
  },
86
110
  {
87
- "test name": "delete 1000 randomly",
88
- "time taken (ms)": "0.04",
89
- "executions per sec": "2.23e+4",
90
- "executed times": "1137",
91
- "sample mean (secs)": "4.48e-5",
92
- "sample deviation": "6.04e-7"
111
+ "test name": "1000 add & delete randomly",
112
+ "time taken (ms)": "13.21",
113
+ "executions per sec": "75.70",
114
+ "executed times": "4",
115
+ "sample mean (secs)": "0.01",
116
+ "sample deviation": "3.61e-4"
93
117
  },
94
118
  {
95
- "test name": "addMany 1000 balanced",
96
- "time taken (ms)": "2.67",
97
- "executions per sec": "375.13",
98
- "executed times": "20",
119
+ "test name": "1000 addMany",
120
+ "time taken (ms)": "2.23",
121
+ "executions per sec": "449.06",
122
+ "executed times": "24",
99
123
  "sample mean (secs)": "0.00",
100
- "sample deviation": "2.64e-4"
124
+ "sample deviation": "4.38e-5"
125
+ },
126
+ {
127
+ "test name": "1000 get",
128
+ "time taken (ms)": "25.81",
129
+ "executions per sec": "38.75",
130
+ "executed times": "2",
131
+ "sample mean (secs)": "0.03",
132
+ "sample deviation": "6.13e-4"
133
+ }
134
+ ],
135
+ "testName": "bst"
136
+ },
137
+ "directed-graph": {
138
+ "benchmarks": [
139
+ {
140
+ "test name": "1000 addVertex",
141
+ "time taken (ms)": "0.10",
142
+ "executions per sec": "9761.68",
143
+ "executed times": "498",
144
+ "sample mean (secs)": "1.02e-4",
145
+ "sample deviation": "1.73e-6"
146
+ },
147
+ {
148
+ "test name": "1000 addEdge",
149
+ "time taken (ms)": "6.40",
150
+ "executions per sec": "156.27",
151
+ "executed times": "9",
152
+ "sample mean (secs)": "0.01",
153
+ "sample deviation": "5.45e-4"
154
+ },
155
+ {
156
+ "test name": "1000 getVertex",
157
+ "time taken (ms)": "0.05",
158
+ "executions per sec": "2.17e+4",
159
+ "executed times": "1094",
160
+ "sample mean (secs)": "4.61e-5",
161
+ "sample deviation": "2.85e-7"
162
+ },
163
+ {
164
+ "test name": "1000 getEdge",
165
+ "time taken (ms)": "22.10",
166
+ "executions per sec": "45.25",
167
+ "executed times": "3",
168
+ "sample mean (secs)": "0.02",
169
+ "sample deviation": "0.00"
170
+ },
171
+ {
172
+ "test name": "tarjan",
173
+ "time taken (ms)": "209.19",
174
+ "executions per sec": "4.78",
175
+ "executed times": "1",
176
+ "sample mean (secs)": "0.21",
177
+ "sample deviation": "0.01"
178
+ },
179
+ {
180
+ "test name": "tarjan all",
181
+ "time taken (ms)": "211.22",
182
+ "executions per sec": "4.73",
183
+ "executed times": "1",
184
+ "sample mean (secs)": "0.21",
185
+ "sample deviation": "0.00"
101
186
  },
102
187
  {
103
- "test name": "get 1000",
104
- "time taken (ms)": "62.25",
105
- "executions per sec": "16.06",
188
+ "test name": "topologicalSort",
189
+ "time taken (ms)": "170.38",
190
+ "executions per sec": "5.87",
106
191
  "executed times": "1",
107
- "sample mean (secs)": "0.06",
192
+ "sample mean (secs)": "0.17",
108
193
  "sample deviation": "0.00"
109
194
  }
110
195
  ],
111
- "testName": "bst"
196
+ "testName": "directed-graph"
112
197
  },
113
198
  "heap": {
114
199
  "benchmarks": [
115
200
  {
116
- "test name": "add & 1000",
201
+ "test name": "1000 add & pop",
117
202
  "time taken (ms)": "0.34",
118
- "executions per sec": "2919.71",
203
+ "executions per sec": "2921.82",
119
204
  "executed times": "149",
120
- "sample mean (secs)": "3.43e-4",
121
- "sample deviation": "4.56e-6"
205
+ "sample mean (secs)": "3.42e-4",
206
+ "sample deviation": "3.19e-6"
122
207
  },
123
208
  {
124
- "test name": "fib add & pop 1000",
125
- "time taken (ms)": "3.88",
126
- "executions per sec": "257.61",
209
+ "test name": "1000 fib add & pop",
210
+ "time taken (ms)": "3.93",
211
+ "executions per sec": "254.62",
127
212
  "executed times": "14",
128
213
  "sample mean (secs)": "0.00",
129
- "sample deviation": "4.79e-5"
214
+ "sample deviation": "7.82e-5"
130
215
  }
131
216
  ],
132
217
  "testName": "heap"
@@ -134,28 +219,28 @@
134
219
  "doubly-linked-list": {
135
220
  "benchmarks": [
136
221
  {
137
- "test name": "unshift 1000000",
138
- "time taken (ms)": "202.43",
139
- "executions per sec": "4.94",
222
+ "test name": "1000000 unshift",
223
+ "time taken (ms)": "218.29",
224
+ "executions per sec": "4.58",
140
225
  "executed times": "1",
141
- "sample mean (secs)": "0.20",
142
- "sample deviation": "0.02"
226
+ "sample mean (secs)": "0.22",
227
+ "sample deviation": "0.07"
143
228
  },
144
229
  {
145
- "test name": "unshift & shift 1000000",
146
- "time taken (ms)": "158.09",
147
- "executions per sec": "6.33",
230
+ "test name": "1000000 unshift & shift",
231
+ "time taken (ms)": "168.88",
232
+ "executions per sec": "5.92",
148
233
  "executed times": "1",
149
- "sample mean (secs)": "0.16",
234
+ "sample mean (secs)": "0.17",
150
235
  "sample deviation": "0.03"
151
236
  },
152
237
  {
153
- "test name": "insertBefore 1000",
238
+ "test name": "1000 insertBefore",
154
239
  "time taken (ms)": "0.03",
155
- "executions per sec": "3.75e+4",
156
- "executed times": "1922",
157
- "sample mean (secs)": "2.67e-5",
158
- "sample deviation": "4.57e-7"
240
+ "executions per sec": "3.72e+4",
241
+ "executed times": "1904",
242
+ "sample mean (secs)": "2.69e-5",
243
+ "sample deviation": "4.13e-7"
159
244
  }
160
245
  ],
161
246
  "testName": "doubly-linked-list"
@@ -163,20 +248,20 @@
163
248
  "singly-linked-list": {
164
249
  "benchmarks": [
165
250
  {
166
- "test name": "push & pop 1000",
251
+ "test name": "1000 push & pop",
167
252
  "time taken (ms)": "1.77",
168
- "executions per sec": "564.48",
253
+ "executions per sec": "564.34",
169
254
  "executed times": "30",
170
255
  "sample mean (secs)": "0.00",
171
- "sample deviation": "7.71e-5"
256
+ "sample deviation": "5.91e-5"
172
257
  },
173
258
  {
174
- "test name": "insertBefore 1000",
175
- "time taken (ms)": "2.29",
176
- "executions per sec": "435.77",
259
+ "test name": "1000 insertBefore",
260
+ "time taken (ms)": "2.31",
261
+ "executions per sec": "432.88",
177
262
  "executed times": "22",
178
263
  "sample mean (secs)": "0.00",
179
- "sample deviation": "3.74e-5"
264
+ "sample deviation": "5.53e-5"
180
265
  }
181
266
  ],
182
267
  "testName": "singly-linked-list"
@@ -184,12 +269,12 @@
184
269
  "max-priority-queue": {
185
270
  "benchmarks": [
186
271
  {
187
- "test name": "refill & poll 1000000",
188
- "time taken (ms)": "1812.54",
189
- "executions per sec": "0.55",
190
- "executed times": "1",
191
- "sample mean (secs)": "1.81",
192
- "sample deviation": "0.02"
272
+ "test name": "10000 refill & poll",
273
+ "time taken (ms)": "11.42",
274
+ "executions per sec": "87.54",
275
+ "executed times": "5",
276
+ "sample mean (secs)": "0.01",
277
+ "sample deviation": "1.63e-4"
193
278
  }
194
279
  ],
195
280
  "testName": "max-priority-queue"
@@ -197,17 +282,17 @@
197
282
  "deque": {
198
283
  "benchmarks": [
199
284
  {
200
- "test name": "push 1000000",
201
- "time taken (ms)": "205.83",
202
- "executions per sec": "4.86",
285
+ "test name": "1000000 push",
286
+ "time taken (ms)": "223.27",
287
+ "executions per sec": "4.48",
203
288
  "executed times": "1",
204
- "sample mean (secs)": "0.21",
289
+ "sample mean (secs)": "0.22",
205
290
  "sample deviation": "0.03"
206
291
  },
207
292
  {
208
- "test name": "shift 1000000",
209
- "time taken (ms)": "24.78",
210
- "executions per sec": "40.35",
293
+ "test name": "1000000 shift",
294
+ "time taken (ms)": "24.66",
295
+ "executions per sec": "40.55",
211
296
  "executed times": "3",
212
297
  "sample mean (secs)": "0.02",
213
298
  "sample deviation": "0.00"
@@ -218,22 +303,43 @@
218
303
  "queue": {
219
304
  "benchmarks": [
220
305
  {
221
- "test name": "push 1000000",
222
- "time taken (ms)": "42.29",
223
- "executions per sec": "23.65",
306
+ "test name": "1000000 push",
307
+ "time taken (ms)": "43.10",
308
+ "executions per sec": "23.20",
224
309
  "executed times": "2",
225
310
  "sample mean (secs)": "0.04",
226
311
  "sample deviation": "0.01"
227
312
  },
228
313
  {
229
- "test name": "push & shift 1000000",
230
- "time taken (ms)": "78.34",
231
- "executions per sec": "12.77",
314
+ "test name": "1000000 push & shift",
315
+ "time taken (ms)": "79.89",
316
+ "executions per sec": "12.52",
232
317
  "executed times": "1",
233
318
  "sample mean (secs)": "0.08",
234
319
  "sample deviation": "0.00"
235
320
  }
236
321
  ],
237
322
  "testName": "queue"
323
+ },
324
+ "trie": {
325
+ "benchmarks": [
326
+ {
327
+ "test name": "100000 push",
328
+ "time taken (ms)": "54.81",
329
+ "executions per sec": "18.24",
330
+ "executed times": "1",
331
+ "sample mean (secs)": "0.05",
332
+ "sample deviation": "0.00"
333
+ },
334
+ {
335
+ "test name": "100000 getWords",
336
+ "time taken (ms)": "94.93",
337
+ "executions per sec": "10.53",
338
+ "executed times": "1",
339
+ "sample mean (secs)": "0.09",
340
+ "sample deviation": "0.01"
341
+ }
342
+ ],
343
+ "testName": "trie"
238
344
  }
239
345
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "data-structure-typed",
3
- "version": "1.41.4",
3
+ "version": "1.41.5",
4
4
  "description": "Data Structures of Javascript & TypeScript. Binary Tree, BST, Graph, Heap, Priority Queue, Linked List, Queue, Deque, Stack, AVL Tree, Tree Multiset, Trie, Directed Graph, Undirected Graph, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/mjs/index.js",
@@ -133,9 +133,12 @@
133
133
  "UMD",
134
134
  "esmodule",
135
135
  "java.util",
136
+ "c++ stl",
136
137
  "c++ std",
137
138
  "Python collections",
138
139
  "System.Collections.Generic",
140
+ "STL",
141
+ "stl",
139
142
  "STD",
140
143
  "std",
141
144
  "util",
@@ -1,24 +1,36 @@
1
1
  import {AVLTree} from '../../../../src';
2
2
  import * as Benchmark from 'benchmark';
3
- import {magnitude, randomInt, randomIntArray} from '../../../utils';
3
+ import {getRandomIntArray, magnitude} from '../../../utils';
4
4
 
5
5
  const suite = new Benchmark.Suite();
6
6
  const avl = new AVLTree<number>();
7
7
  const {N_LOG_N} = magnitude;
8
+ const arr = getRandomIntArray(N_LOG_N, 0, N_LOG_N, true);
8
9
 
9
10
  suite
10
- .add(`add ${N_LOG_N} randomly`, () => {
11
- for (let i = 0; i < N_LOG_N; i++) avl.add(randomInt(0, N_LOG_N));
11
+ .add(`${N_LOG_N} add randomly`, () => {
12
+ avl.clear();
13
+ for (let i = 0; i < arr.length; i++) {
14
+ avl.add(arr[i]);
15
+ }
12
16
  })
13
- .add(`delete ${N_LOG_N} randomly`, () => {
14
- for (let i = 0; i < N_LOG_N; i++) avl.delete(randomInt(0, N_LOG_N));
17
+ .add(`${N_LOG_N} add & delete randomly`, () => {
18
+ avl.clear();
19
+ for (let i = 0; i < arr.length; i++) {
20
+ avl.add(arr[i]);
21
+ }
22
+ for (let i = 0; i < arr.length; i++) {
23
+ avl.delete(arr[i]);
24
+ }
15
25
  })
16
- .add(`addMany ${N_LOG_N}`, () => {
17
- const arr = randomIntArray(N_LOG_N);
26
+ .add(`${N_LOG_N} addMany`, () => {
27
+ avl.clear();
18
28
  avl.addMany(arr);
19
29
  })
20
- .add(`get ${N_LOG_N}`, () => {
21
- for (let i = 0; i < N_LOG_N; i++) avl.get(randomInt(-N_LOG_N, N_LOG_N));
30
+ .add(`${N_LOG_N} get`, () => {
31
+ for (let i = 0; i < arr.length; i++) {
32
+ avl.get(arr[i]);
33
+ }
22
34
  });
23
35
 
24
36
  export {suite};