data-structure-typed 1.48.1 → 1.48.2
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 +24 -18
- package/benchmark/report.html +16 -16
- package/benchmark/report.json +182 -182
- package/dist/cjs/data-structures/base/index.d.ts +1 -0
- package/dist/cjs/data-structures/base/index.js +18 -0
- package/dist/cjs/data-structures/base/index.js.map +1 -0
- package/dist/cjs/data-structures/base/iterable-base.d.ts +232 -0
- package/dist/cjs/data-structures/base/iterable-base.js +313 -0
- package/dist/cjs/data-structures/base/iterable-base.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +36 -69
- package/dist/cjs/data-structures/binary-tree/binary-tree.js +78 -129
- package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +1 -1
- package/dist/cjs/data-structures/graph/abstract-graph.d.ts +44 -6
- package/dist/cjs/data-structures/graph/abstract-graph.js +50 -27
- package/dist/cjs/data-structures/graph/abstract-graph.js.map +1 -1
- package/dist/cjs/data-structures/hash/hash-map.d.ts +59 -100
- package/dist/cjs/data-structures/hash/hash-map.js +69 -173
- package/dist/cjs/data-structures/hash/hash-map.js.map +1 -1
- package/dist/cjs/data-structures/heap/heap.d.ts +50 -7
- package/dist/cjs/data-structures/heap/heap.js +60 -30
- package/dist/cjs/data-structures/heap/heap.js.map +1 -1
- package/dist/cjs/data-structures/index.d.ts +1 -0
- package/dist/cjs/data-structures/index.js +1 -0
- package/dist/cjs/data-structures/index.js.map +1 -1
- package/dist/cjs/data-structures/linked-list/doubly-linked-list.d.ts +38 -51
- package/dist/cjs/data-structures/linked-list/doubly-linked-list.js +46 -73
- package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +1 -1
- package/dist/cjs/data-structures/linked-list/singly-linked-list.d.ts +32 -51
- package/dist/cjs/data-structures/linked-list/singly-linked-list.js +40 -73
- package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +1 -1
- package/dist/cjs/data-structures/queue/deque.d.ts +29 -51
- package/dist/cjs/data-structures/queue/deque.js +36 -71
- package/dist/cjs/data-structures/queue/deque.js.map +1 -1
- package/dist/cjs/data-structures/queue/queue.d.ts +49 -48
- package/dist/cjs/data-structures/queue/queue.js +69 -82
- package/dist/cjs/data-structures/queue/queue.js.map +1 -1
- package/dist/cjs/data-structures/stack/stack.d.ts +43 -10
- package/dist/cjs/data-structures/stack/stack.js +50 -31
- package/dist/cjs/data-structures/stack/stack.js.map +1 -1
- package/dist/cjs/data-structures/trie/trie.d.ts +41 -6
- package/dist/cjs/data-structures/trie/trie.js +53 -32
- package/dist/cjs/data-structures/trie/trie.js.map +1 -1
- package/dist/cjs/types/data-structures/base/base.d.ts +5 -0
- package/dist/cjs/types/data-structures/base/base.js +3 -0
- package/dist/cjs/types/data-structures/base/base.js.map +1 -0
- package/dist/cjs/types/data-structures/base/index.d.ts +1 -0
- package/dist/cjs/types/data-structures/base/index.js +18 -0
- package/dist/cjs/types/data-structures/base/index.js.map +1 -0
- package/dist/cjs/types/data-structures/index.d.ts +1 -0
- package/dist/cjs/types/data-structures/index.js +1 -0
- package/dist/cjs/types/data-structures/index.js.map +1 -1
- package/dist/mjs/data-structures/base/index.d.ts +1 -0
- package/dist/mjs/data-structures/base/index.js +1 -0
- package/dist/mjs/data-structures/base/iterable-base.d.ts +232 -0
- package/dist/mjs/data-structures/base/iterable-base.js +307 -0
- package/dist/mjs/data-structures/binary-tree/binary-tree.d.ts +36 -69
- package/dist/mjs/data-structures/binary-tree/binary-tree.js +78 -129
- package/dist/mjs/data-structures/graph/abstract-graph.d.ts +44 -6
- package/dist/mjs/data-structures/graph/abstract-graph.js +52 -27
- package/dist/mjs/data-structures/hash/hash-map.d.ts +59 -100
- package/dist/mjs/data-structures/hash/hash-map.js +69 -173
- package/dist/mjs/data-structures/heap/heap.d.ts +50 -7
- package/dist/mjs/data-structures/heap/heap.js +60 -30
- package/dist/mjs/data-structures/index.d.ts +1 -0
- package/dist/mjs/data-structures/index.js +1 -0
- package/dist/mjs/data-structures/linked-list/doubly-linked-list.d.ts +38 -51
- package/dist/mjs/data-structures/linked-list/doubly-linked-list.js +46 -73
- package/dist/mjs/data-structures/linked-list/singly-linked-list.d.ts +32 -51
- package/dist/mjs/data-structures/linked-list/singly-linked-list.js +40 -73
- package/dist/mjs/data-structures/queue/deque.d.ts +29 -51
- package/dist/mjs/data-structures/queue/deque.js +36 -71
- package/dist/mjs/data-structures/queue/queue.d.ts +49 -48
- package/dist/mjs/data-structures/queue/queue.js +66 -79
- package/dist/mjs/data-structures/stack/stack.d.ts +43 -10
- package/dist/mjs/data-structures/stack/stack.js +50 -31
- package/dist/mjs/data-structures/trie/trie.d.ts +41 -6
- package/dist/mjs/data-structures/trie/trie.js +53 -32
- package/dist/mjs/types/data-structures/base/base.d.ts +5 -0
- package/dist/mjs/types/data-structures/base/base.js +1 -0
- package/dist/mjs/types/data-structures/base/index.d.ts +1 -0
- package/dist/mjs/types/data-structures/base/index.js +1 -0
- package/dist/mjs/types/data-structures/index.d.ts +1 -0
- package/dist/mjs/types/data-structures/index.js +1 -0
- package/dist/umd/data-structure-typed.js +846 -715
- 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/base/index.ts +1 -0
- package/src/data-structures/base/iterable-base.ts +329 -0
- package/src/data-structures/binary-tree/binary-tree.ts +82 -138
- package/src/data-structures/graph/abstract-graph.ts +55 -28
- package/src/data-structures/hash/hash-map.ts +76 -185
- package/src/data-structures/heap/heap.ts +63 -36
- package/src/data-structures/index.ts +1 -0
- package/src/data-structures/linked-list/doubly-linked-list.ts +50 -79
- package/src/data-structures/linked-list/singly-linked-list.ts +45 -80
- package/src/data-structures/queue/deque.ts +40 -82
- package/src/data-structures/queue/queue.ts +72 -87
- package/src/data-structures/stack/stack.ts +53 -34
- package/src/data-structures/trie/trie.ts +58 -35
- package/src/types/data-structures/base/base.ts +6 -0
- package/src/types/data-structures/base/index.ts +1 -0
- package/src/types/data-structures/index.ts +1 -0
- package/test/unit/data-structures/binary-tree/avl-tree.test.ts +10 -10
- package/test/unit/data-structures/binary-tree/binary-tree.test.ts +10 -10
- package/test/unit/data-structures/binary-tree/bst.test.ts +10 -10
- package/test/unit/data-structures/binary-tree/rb-tree.test.ts +8 -8
- package/test/unit/data-structures/binary-tree/tree-multimap.test.ts +10 -10
- package/test/unit/data-structures/graph/directed-graph.test.ts +4 -4
- package/test/unit/data-structures/hash/hash-map.test.ts +2 -2
- package/test/unit/data-structures/linked-list/doubly-linked-list.test.ts +28 -0
- package/test/unit/data-structures/linked-list/singly-linked-list.test.ts +25 -0
- package/test/unit/data-structures/queue/deque.test.ts +25 -0
package/benchmark/report.json
CHANGED
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
"benchmarks": [
|
|
4
4
|
{
|
|
5
5
|
"test name": "10,000 add randomly",
|
|
6
|
-
"time taken (ms)": "
|
|
7
|
-
"executions per sec": "
|
|
8
|
-
"sample deviation": "
|
|
6
|
+
"time taken (ms)": "34.57",
|
|
7
|
+
"executions per sec": "28.93",
|
|
8
|
+
"sample deviation": "0.01"
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"test name": "10,000 add & delete randomly",
|
|
12
|
-
"time taken (ms)": "
|
|
13
|
-
"executions per sec": "
|
|
14
|
-
"sample deviation": "0.
|
|
12
|
+
"time taken (ms)": "80.91",
|
|
13
|
+
"executions per sec": "12.36",
|
|
14
|
+
"sample deviation": "0.02"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"test name": "10,000 addMany",
|
|
18
|
-
"time taken (ms)": "
|
|
19
|
-
"executions per sec": "
|
|
20
|
-
"sample deviation": "
|
|
18
|
+
"time taken (ms)": "38.81",
|
|
19
|
+
"executions per sec": "25.76",
|
|
20
|
+
"sample deviation": "0.01"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"test name": "10,000 get",
|
|
24
|
-
"time taken (ms)": "
|
|
25
|
-
"executions per sec": "
|
|
26
|
-
"sample deviation": "
|
|
24
|
+
"time taken (ms)": "32.58",
|
|
25
|
+
"executions per sec": "30.69",
|
|
26
|
+
"sample deviation": "0.01"
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
29
|
"testName": "avl-tree"
|
|
@@ -32,51 +32,51 @@
|
|
|
32
32
|
"benchmarks": [
|
|
33
33
|
{
|
|
34
34
|
"test name": "1,000 add randomly",
|
|
35
|
-
"time taken (ms)": "14.
|
|
36
|
-
"executions per sec": "
|
|
37
|
-
"sample deviation": "
|
|
35
|
+
"time taken (ms)": "14.61",
|
|
36
|
+
"executions per sec": "68.46",
|
|
37
|
+
"sample deviation": "0.00"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"test name": "1,000 add & delete randomly",
|
|
41
|
-
"time taken (ms)": "
|
|
42
|
-
"executions per sec": "
|
|
43
|
-
"sample deviation": "
|
|
41
|
+
"time taken (ms)": "21.50",
|
|
42
|
+
"executions per sec": "46.51",
|
|
43
|
+
"sample deviation": "0.01"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"test name": "1,000 addMany",
|
|
47
|
-
"time taken (ms)": "
|
|
48
|
-
"executions per sec": "
|
|
49
|
-
"sample deviation": "0.
|
|
47
|
+
"time taken (ms)": "15.57",
|
|
48
|
+
"executions per sec": "64.22",
|
|
49
|
+
"sample deviation": "0.01"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"test name": "1,000 get",
|
|
53
|
-
"time taken (ms)": "
|
|
54
|
-
"executions per sec": "
|
|
55
|
-
"sample deviation": "
|
|
53
|
+
"time taken (ms)": "32.93",
|
|
54
|
+
"executions per sec": "30.36",
|
|
55
|
+
"sample deviation": "0.02"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"test name": "1,000 has",
|
|
59
|
-
"time taken (ms)": "
|
|
60
|
-
"executions per sec": "
|
|
61
|
-
"sample deviation": "0.
|
|
59
|
+
"time taken (ms)": "26.55",
|
|
60
|
+
"executions per sec": "37.67",
|
|
61
|
+
"sample deviation": "0.02"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
"test name": "1,000 dfs",
|
|
65
|
-
"time taken (ms)": "
|
|
66
|
-
"executions per sec": "
|
|
67
|
-
"sample deviation": "0.
|
|
65
|
+
"time taken (ms)": "181.64",
|
|
66
|
+
"executions per sec": "5.51",
|
|
67
|
+
"sample deviation": "0.03"
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"test name": "1,000 bfs",
|
|
71
|
-
"time taken (ms)": "
|
|
72
|
-
"executions per sec": "
|
|
73
|
-
"sample deviation": "
|
|
71
|
+
"time taken (ms)": "94.85",
|
|
72
|
+
"executions per sec": "10.54",
|
|
73
|
+
"sample deviation": "0.05"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"test name": "1,000 morris",
|
|
77
|
-
"time taken (ms)": "
|
|
78
|
-
"executions per sec": "3.
|
|
79
|
-
"sample deviation": "0.
|
|
77
|
+
"time taken (ms)": "316.07",
|
|
78
|
+
"executions per sec": "3.16",
|
|
79
|
+
"sample deviation": "0.04"
|
|
80
80
|
}
|
|
81
81
|
],
|
|
82
82
|
"testName": "binary-tree"
|
|
@@ -85,26 +85,26 @@
|
|
|
85
85
|
"benchmarks": [
|
|
86
86
|
{
|
|
87
87
|
"test name": "10,000 add randomly",
|
|
88
|
-
"time taken (ms)": "
|
|
89
|
-
"executions per sec": "
|
|
90
|
-
"sample deviation": "
|
|
88
|
+
"time taken (ms)": "27.63",
|
|
89
|
+
"executions per sec": "36.19",
|
|
90
|
+
"sample deviation": "0.01"
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"test name": "10,000 add & delete randomly",
|
|
94
|
-
"time taken (ms)": "
|
|
95
|
-
"executions per sec": "
|
|
96
|
-
"sample deviation": "0.
|
|
94
|
+
"time taken (ms)": "73.15",
|
|
95
|
+
"executions per sec": "13.67",
|
|
96
|
+
"sample deviation": "0.02"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"test name": "10,000 addMany",
|
|
100
|
-
"time taken (ms)": "
|
|
101
|
-
"executions per sec": "
|
|
102
|
-
"sample deviation": "
|
|
100
|
+
"time taken (ms)": "27.44",
|
|
101
|
+
"executions per sec": "36.44",
|
|
102
|
+
"sample deviation": "0.01"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"test name": "10,000 get",
|
|
106
|
-
"time taken (ms)": "
|
|
107
|
-
"executions per sec": "
|
|
106
|
+
"time taken (ms)": "37.03",
|
|
107
|
+
"executions per sec": "27.01",
|
|
108
108
|
"sample deviation": "0.02"
|
|
109
109
|
}
|
|
110
110
|
],
|
|
@@ -114,27 +114,27 @@
|
|
|
114
114
|
"benchmarks": [
|
|
115
115
|
{
|
|
116
116
|
"test name": "100,000 add",
|
|
117
|
-
"time taken (ms)": "
|
|
118
|
-
"executions per sec": "
|
|
119
|
-
"sample deviation": "0.
|
|
117
|
+
"time taken (ms)": "113.44",
|
|
118
|
+
"executions per sec": "8.82",
|
|
119
|
+
"sample deviation": "0.02"
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"test name": "100,000 add & delete randomly",
|
|
123
|
-
"time taken (ms)": "
|
|
124
|
-
"executions per sec": "
|
|
125
|
-
"sample deviation": "0.
|
|
123
|
+
"time taken (ms)": "283.31",
|
|
124
|
+
"executions per sec": "3.53",
|
|
125
|
+
"sample deviation": "0.03"
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
"test name": "100,000 getNode",
|
|
129
|
-
"time taken (ms)": "
|
|
130
|
-
"executions per sec": "
|
|
131
|
-
"sample deviation": "
|
|
129
|
+
"time taken (ms)": "89.35",
|
|
130
|
+
"executions per sec": "11.19",
|
|
131
|
+
"sample deviation": "0.01"
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
"test name": "100,000 add & iterator",
|
|
135
|
-
"time taken (ms)": "
|
|
136
|
-
"executions per sec": "
|
|
137
|
-
"sample deviation": "0.
|
|
135
|
+
"time taken (ms)": "143.95",
|
|
136
|
+
"executions per sec": "6.95",
|
|
137
|
+
"sample deviation": "0.03"
|
|
138
138
|
}
|
|
139
139
|
],
|
|
140
140
|
"testName": "rb-tree"
|
|
@@ -144,38 +144,38 @@
|
|
|
144
144
|
{
|
|
145
145
|
"test name": "SRC PQ 10,000 add",
|
|
146
146
|
"time taken (ms)": "0.16",
|
|
147
|
-
"executions per sec": "
|
|
148
|
-
"sample deviation": "3.
|
|
147
|
+
"executions per sec": "6180.55",
|
|
148
|
+
"sample deviation": "3.37e-5"
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
"test name": "CJS PQ 10,000 add",
|
|
152
|
-
"time taken (ms)": "0.
|
|
153
|
-
"executions per sec": "
|
|
154
|
-
"sample deviation": "
|
|
152
|
+
"time taken (ms)": "0.17",
|
|
153
|
+
"executions per sec": "6004.31",
|
|
154
|
+
"sample deviation": "4.09e-5"
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
157
|
"test name": "MJS PQ 10,000 add",
|
|
158
|
-
"time taken (ms)": "0.
|
|
159
|
-
"executions per sec": "
|
|
160
|
-
"sample deviation": "1.
|
|
158
|
+
"time taken (ms)": "0.66",
|
|
159
|
+
"executions per sec": "1512.95",
|
|
160
|
+
"sample deviation": "1.66e-4"
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
"test name": "SRC PQ 10,000 add & pop",
|
|
164
|
-
"time taken (ms)": "3.
|
|
165
|
-
"executions per sec": "
|
|
166
|
-
"sample deviation": "
|
|
164
|
+
"time taken (ms)": "3.89",
|
|
165
|
+
"executions per sec": "256.83",
|
|
166
|
+
"sample deviation": "7.53e-4"
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
"test name": "CJS PQ 10,000 add & pop",
|
|
170
|
-
"time taken (ms)": "
|
|
171
|
-
"executions per sec": "
|
|
172
|
-
"sample deviation": "
|
|
170
|
+
"time taken (ms)": "4.02",
|
|
171
|
+
"executions per sec": "248.66",
|
|
172
|
+
"sample deviation": "0.00"
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
175
|
"test name": "MJS PQ 10,000 add & pop",
|
|
176
|
-
"time taken (ms)": "
|
|
177
|
-
"executions per sec": "
|
|
178
|
-
"sample deviation": "
|
|
176
|
+
"time taken (ms)": "3.78",
|
|
177
|
+
"executions per sec": "264.62",
|
|
178
|
+
"sample deviation": "8.38e-4"
|
|
179
179
|
}
|
|
180
180
|
],
|
|
181
181
|
"testName": "comparison"
|
|
@@ -184,45 +184,45 @@
|
|
|
184
184
|
"benchmarks": [
|
|
185
185
|
{
|
|
186
186
|
"test name": "1,000 addVertex",
|
|
187
|
-
"time taken (ms)": "0.
|
|
188
|
-
"executions per sec": "
|
|
189
|
-
"sample deviation": "
|
|
187
|
+
"time taken (ms)": "0.12",
|
|
188
|
+
"executions per sec": "8625.55",
|
|
189
|
+
"sample deviation": "2.88e-5"
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
192
|
"test name": "1,000 addEdge",
|
|
193
|
-
"time taken (ms)": "
|
|
194
|
-
"executions per sec": "
|
|
195
|
-
"sample deviation": "
|
|
193
|
+
"time taken (ms)": "8.52",
|
|
194
|
+
"executions per sec": "117.35",
|
|
195
|
+
"sample deviation": "0.00"
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
"test name": "1,000 getVertex",
|
|
199
199
|
"time taken (ms)": "0.05",
|
|
200
|
-
"executions per sec": "
|
|
201
|
-
"sample deviation": "1.
|
|
200
|
+
"executions per sec": "1.92e+4",
|
|
201
|
+
"sample deviation": "1.11e-5"
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
"test name": "1,000 getEdge",
|
|
205
|
-
"time taken (ms)": "
|
|
206
|
-
"executions per sec": "
|
|
207
|
-
"sample deviation": "0.
|
|
205
|
+
"time taken (ms)": "20.83",
|
|
206
|
+
"executions per sec": "48.02",
|
|
207
|
+
"sample deviation": "0.00"
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
210
|
"test name": "tarjan",
|
|
211
|
-
"time taken (ms)": "
|
|
212
|
-
"executions per sec": "
|
|
213
|
-
"sample deviation": "0.
|
|
211
|
+
"time taken (ms)": "195.71",
|
|
212
|
+
"executions per sec": "5.11",
|
|
213
|
+
"sample deviation": "0.02"
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
"test name": "tarjan all",
|
|
217
|
-
"time taken (ms)": "
|
|
218
|
-
"executions per sec": "
|
|
219
|
-
"sample deviation": "0.
|
|
217
|
+
"time taken (ms)": "191.98",
|
|
218
|
+
"executions per sec": "5.21",
|
|
219
|
+
"sample deviation": "0.02"
|
|
220
220
|
},
|
|
221
221
|
{
|
|
222
222
|
"test name": "topologicalSort",
|
|
223
|
-
"time taken (ms)": "
|
|
224
|
-
"executions per sec": "
|
|
225
|
-
"sample deviation": "0.
|
|
223
|
+
"time taken (ms)": "155.83",
|
|
224
|
+
"executions per sec": "6.42",
|
|
225
|
+
"sample deviation": "0.03"
|
|
226
226
|
}
|
|
227
227
|
],
|
|
228
228
|
"testName": "directed-graph"
|
|
@@ -231,56 +231,56 @@
|
|
|
231
231
|
"benchmarks": [
|
|
232
232
|
{
|
|
233
233
|
"test name": "1,000,000 set",
|
|
234
|
-
"time taken (ms)": "
|
|
235
|
-
"executions per sec": "
|
|
236
|
-
"sample deviation": "0.
|
|
234
|
+
"time taken (ms)": "129.78",
|
|
235
|
+
"executions per sec": "7.71",
|
|
236
|
+
"sample deviation": "0.05"
|
|
237
237
|
},
|
|
238
238
|
{
|
|
239
239
|
"test name": "1,000,000 Map set",
|
|
240
|
-
"time taken (ms)": "
|
|
241
|
-
"executions per sec": "
|
|
242
|
-
"sample deviation": "0.
|
|
240
|
+
"time taken (ms)": "276.67",
|
|
241
|
+
"executions per sec": "3.61",
|
|
242
|
+
"sample deviation": "0.03"
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
245
|
"test name": "1,000,000 Set add",
|
|
246
|
-
"time taken (ms)": "
|
|
247
|
-
"executions per sec": "
|
|
248
|
-
"sample deviation": "0.
|
|
246
|
+
"time taken (ms)": "239.70",
|
|
247
|
+
"executions per sec": "4.17",
|
|
248
|
+
"sample deviation": "0.04"
|
|
249
249
|
},
|
|
250
250
|
{
|
|
251
251
|
"test name": "1,000,000 set & get",
|
|
252
|
-
"time taken (ms)": "
|
|
253
|
-
"executions per sec": "
|
|
252
|
+
"time taken (ms)": "143.96",
|
|
253
|
+
"executions per sec": "6.95",
|
|
254
254
|
"sample deviation": "0.04"
|
|
255
255
|
},
|
|
256
256
|
{
|
|
257
257
|
"test name": "1,000,000 Map set & get",
|
|
258
|
-
"time taken (ms)": "
|
|
259
|
-
"executions per sec": "
|
|
260
|
-
"sample deviation": "0.
|
|
258
|
+
"time taken (ms)": "371.31",
|
|
259
|
+
"executions per sec": "2.69",
|
|
260
|
+
"sample deviation": "0.10"
|
|
261
261
|
},
|
|
262
262
|
{
|
|
263
263
|
"test name": "1,000,000 Set add & has",
|
|
264
|
-
"time taken (ms)": "
|
|
265
|
-
"executions per sec": "
|
|
266
|
-
"sample deviation": "0.
|
|
264
|
+
"time taken (ms)": "247.24",
|
|
265
|
+
"executions per sec": "4.04",
|
|
266
|
+
"sample deviation": "0.05"
|
|
267
267
|
},
|
|
268
268
|
{
|
|
269
269
|
"test name": "1,000,000 ObjKey set & get",
|
|
270
|
-
"time taken (ms)": "
|
|
271
|
-
"executions per sec": "2.
|
|
272
|
-
"sample deviation": "0.
|
|
270
|
+
"time taken (ms)": "396.42",
|
|
271
|
+
"executions per sec": "2.52",
|
|
272
|
+
"sample deviation": "0.06"
|
|
273
273
|
},
|
|
274
274
|
{
|
|
275
275
|
"test name": "1,000,000 Map ObjKey set & get",
|
|
276
|
-
"time taken (ms)": "
|
|
277
|
-
"executions per sec": "
|
|
278
|
-
"sample deviation": "0.
|
|
276
|
+
"time taken (ms)": "411.40",
|
|
277
|
+
"executions per sec": "2.43",
|
|
278
|
+
"sample deviation": "0.10"
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
"test name": "1,000,000 Set ObjKey add & has",
|
|
282
|
-
"time taken (ms)": "
|
|
283
|
-
"executions per sec": "
|
|
282
|
+
"time taken (ms)": "357.45",
|
|
283
|
+
"executions per sec": "2.80",
|
|
284
284
|
"sample deviation": "0.05"
|
|
285
285
|
}
|
|
286
286
|
],
|
|
@@ -290,21 +290,21 @@
|
|
|
290
290
|
"benchmarks": [
|
|
291
291
|
{
|
|
292
292
|
"test name": "100,000 add & pop",
|
|
293
|
-
"time taken (ms)": "
|
|
294
|
-
"executions per sec": "
|
|
295
|
-
"sample deviation": "0.
|
|
293
|
+
"time taken (ms)": "88.96",
|
|
294
|
+
"executions per sec": "11.24",
|
|
295
|
+
"sample deviation": "0.02"
|
|
296
296
|
},
|
|
297
297
|
{
|
|
298
298
|
"test name": "100,000 add & dfs",
|
|
299
|
-
"time taken (ms)": "
|
|
300
|
-
"executions per sec": "
|
|
301
|
-
"sample deviation": "0.
|
|
299
|
+
"time taken (ms)": "38.81",
|
|
300
|
+
"executions per sec": "25.77",
|
|
301
|
+
"sample deviation": "0.01"
|
|
302
302
|
},
|
|
303
303
|
{
|
|
304
304
|
"test name": "10,000 fib add & pop",
|
|
305
|
-
"time taken (ms)": "
|
|
306
|
-
"executions per sec": "2.
|
|
307
|
-
"sample deviation": "0.
|
|
305
|
+
"time taken (ms)": "399.77",
|
|
306
|
+
"executions per sec": "2.50",
|
|
307
|
+
"sample deviation": "0.01"
|
|
308
308
|
}
|
|
309
309
|
],
|
|
310
310
|
"testName": "heap"
|
|
@@ -313,27 +313,27 @@
|
|
|
313
313
|
"benchmarks": [
|
|
314
314
|
{
|
|
315
315
|
"test name": "1,000,000 push",
|
|
316
|
-
"time taken (ms)": "
|
|
317
|
-
"executions per sec": "
|
|
318
|
-
"sample deviation": "0.
|
|
316
|
+
"time taken (ms)": "264.62",
|
|
317
|
+
"executions per sec": "3.78",
|
|
318
|
+
"sample deviation": "0.08"
|
|
319
319
|
},
|
|
320
320
|
{
|
|
321
321
|
"test name": "1,000,000 unshift",
|
|
322
|
-
"time taken (ms)": "
|
|
323
|
-
"executions per sec": "
|
|
324
|
-
"sample deviation": "0.
|
|
322
|
+
"time taken (ms)": "264.00",
|
|
323
|
+
"executions per sec": "3.79",
|
|
324
|
+
"sample deviation": "0.05"
|
|
325
325
|
},
|
|
326
326
|
{
|
|
327
327
|
"test name": "1,000,000 unshift & shift",
|
|
328
|
-
"time taken (ms)": "
|
|
329
|
-
"executions per sec": "
|
|
330
|
-
"sample deviation": "0.
|
|
328
|
+
"time taken (ms)": "211.89",
|
|
329
|
+
"executions per sec": "4.72",
|
|
330
|
+
"sample deviation": "0.07"
|
|
331
331
|
},
|
|
332
332
|
{
|
|
333
333
|
"test name": "1,000,000 insertBefore",
|
|
334
|
-
"time taken (ms)": "
|
|
335
|
-
"executions per sec": "2.
|
|
336
|
-
"sample deviation": "0.
|
|
334
|
+
"time taken (ms)": "467.62",
|
|
335
|
+
"executions per sec": "2.14",
|
|
336
|
+
"sample deviation": "0.22"
|
|
337
337
|
}
|
|
338
338
|
],
|
|
339
339
|
"testName": "doubly-linked-list"
|
|
@@ -342,15 +342,15 @@
|
|
|
342
342
|
"benchmarks": [
|
|
343
343
|
{
|
|
344
344
|
"test name": "10,000 push & pop",
|
|
345
|
-
"time taken (ms)": "
|
|
346
|
-
"executions per sec": "
|
|
347
|
-
"sample deviation": "0.
|
|
345
|
+
"time taken (ms)": "260.65",
|
|
346
|
+
"executions per sec": "3.84",
|
|
347
|
+
"sample deviation": "0.04"
|
|
348
348
|
},
|
|
349
349
|
{
|
|
350
350
|
"test name": "10,000 insertBefore",
|
|
351
|
-
"time taken (ms)": "
|
|
352
|
-
"executions per sec": "
|
|
353
|
-
"sample deviation": "0.
|
|
351
|
+
"time taken (ms)": "283.61",
|
|
352
|
+
"executions per sec": "3.53",
|
|
353
|
+
"sample deviation": "0.02"
|
|
354
354
|
}
|
|
355
355
|
],
|
|
356
356
|
"testName": "singly-linked-list"
|
|
@@ -359,9 +359,9 @@
|
|
|
359
359
|
"benchmarks": [
|
|
360
360
|
{
|
|
361
361
|
"test name": "10,000 refill & poll",
|
|
362
|
-
"time taken (ms)": "
|
|
363
|
-
"executions per sec": "
|
|
364
|
-
"sample deviation": "
|
|
362
|
+
"time taken (ms)": "10.29",
|
|
363
|
+
"executions per sec": "97.16",
|
|
364
|
+
"sample deviation": "0.00"
|
|
365
365
|
}
|
|
366
366
|
],
|
|
367
367
|
"testName": "max-priority-queue"
|
|
@@ -370,9 +370,9 @@
|
|
|
370
370
|
"benchmarks": [
|
|
371
371
|
{
|
|
372
372
|
"test name": "100,000 add & pop",
|
|
373
|
-
"time taken (ms)": "
|
|
374
|
-
"executions per sec": "
|
|
375
|
-
"sample deviation": "0.
|
|
373
|
+
"time taken (ms)": "117.05",
|
|
374
|
+
"executions per sec": "8.54",
|
|
375
|
+
"sample deviation": "0.02"
|
|
376
376
|
}
|
|
377
377
|
],
|
|
378
378
|
"testName": "priority-queue"
|
|
@@ -381,26 +381,26 @@
|
|
|
381
381
|
"benchmarks": [
|
|
382
382
|
{
|
|
383
383
|
"test name": "1,000,000 push",
|
|
384
|
-
"time taken (ms)": "
|
|
385
|
-
"executions per sec": "68
|
|
386
|
-
"sample deviation": "
|
|
384
|
+
"time taken (ms)": "15.96",
|
|
385
|
+
"executions per sec": "62.68",
|
|
386
|
+
"sample deviation": "0.00"
|
|
387
387
|
},
|
|
388
388
|
{
|
|
389
389
|
"test name": "1,000,000 push & pop",
|
|
390
|
-
"time taken (ms)": "
|
|
391
|
-
"executions per sec": "
|
|
392
|
-
"sample deviation": "
|
|
390
|
+
"time taken (ms)": "25.90",
|
|
391
|
+
"executions per sec": "38.61",
|
|
392
|
+
"sample deviation": "0.01"
|
|
393
393
|
},
|
|
394
394
|
{
|
|
395
395
|
"test name": "1,000,000 push & shift",
|
|
396
|
-
"time taken (ms)": "
|
|
397
|
-
"executions per sec": "
|
|
398
|
-
"sample deviation": "
|
|
396
|
+
"time taken (ms)": "26.33",
|
|
397
|
+
"executions per sec": "37.98",
|
|
398
|
+
"sample deviation": "0.00"
|
|
399
399
|
},
|
|
400
400
|
{
|
|
401
401
|
"test name": "1,000,000 unshift & shift",
|
|
402
|
-
"time taken (ms)": "
|
|
403
|
-
"executions per sec": "
|
|
402
|
+
"time taken (ms)": "24.90",
|
|
403
|
+
"executions per sec": "40.16",
|
|
404
404
|
"sample deviation": "0.00"
|
|
405
405
|
}
|
|
406
406
|
],
|
|
@@ -410,15 +410,15 @@
|
|
|
410
410
|
"benchmarks": [
|
|
411
411
|
{
|
|
412
412
|
"test name": "1,000,000 push",
|
|
413
|
-
"time taken (ms)": "
|
|
414
|
-
"executions per sec": "
|
|
413
|
+
"time taken (ms)": "44.53",
|
|
414
|
+
"executions per sec": "22.46",
|
|
415
415
|
"sample deviation": "0.01"
|
|
416
416
|
},
|
|
417
417
|
{
|
|
418
418
|
"test name": "1,000,000 push & shift",
|
|
419
|
-
"time taken (ms)": "
|
|
420
|
-
"executions per sec": "
|
|
421
|
-
"sample deviation": "0.
|
|
419
|
+
"time taken (ms)": "92.57",
|
|
420
|
+
"executions per sec": "10.80",
|
|
421
|
+
"sample deviation": "0.02"
|
|
422
422
|
}
|
|
423
423
|
],
|
|
424
424
|
"testName": "queue"
|
|
@@ -427,15 +427,15 @@
|
|
|
427
427
|
"benchmarks": [
|
|
428
428
|
{
|
|
429
429
|
"test name": "1,000,000 push",
|
|
430
|
-
"time taken (ms)": "
|
|
431
|
-
"executions per sec": "
|
|
432
|
-
"sample deviation": "0.
|
|
430
|
+
"time taken (ms)": "59.07",
|
|
431
|
+
"executions per sec": "16.93",
|
|
432
|
+
"sample deviation": "0.02"
|
|
433
433
|
},
|
|
434
434
|
{
|
|
435
435
|
"test name": "1,000,000 push & pop",
|
|
436
|
-
"time taken (ms)": "
|
|
437
|
-
"executions per sec": "
|
|
438
|
-
"sample deviation": "0.
|
|
436
|
+
"time taken (ms)": "52.68",
|
|
437
|
+
"executions per sec": "18.98",
|
|
438
|
+
"sample deviation": "0.02"
|
|
439
439
|
}
|
|
440
440
|
],
|
|
441
441
|
"testName": "stack"
|
|
@@ -444,15 +444,15 @@
|
|
|
444
444
|
"benchmarks": [
|
|
445
445
|
{
|
|
446
446
|
"test name": "100,000 push",
|
|
447
|
-
"time taken (ms)": "
|
|
448
|
-
"executions per sec": "
|
|
449
|
-
"sample deviation": "0.
|
|
447
|
+
"time taken (ms)": "68.45",
|
|
448
|
+
"executions per sec": "14.61",
|
|
449
|
+
"sample deviation": "0.02"
|
|
450
450
|
},
|
|
451
451
|
{
|
|
452
452
|
"test name": "100,000 getWords",
|
|
453
|
-
"time taken (ms)": "
|
|
454
|
-
"executions per sec": "
|
|
455
|
-
"sample deviation": "0.
|
|
453
|
+
"time taken (ms)": "134.22",
|
|
454
|
+
"executions per sec": "7.45",
|
|
455
|
+
"sample deviation": "0.04"
|
|
456
456
|
}
|
|
457
457
|
],
|
|
458
458
|
"testName": "trie"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './iterable-base';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./iterable-base"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data-structures/base/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
|