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