data-structure-typed 2.0.5 → 2.1.0

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.
Files changed (260) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/COMMANDS.md +17 -0
  3. package/benchmark/report.html +13 -77
  4. package/benchmark/report.json +145 -177
  5. package/dist/cjs/data-structures/base/iterable-element-base.d.ts +186 -83
  6. package/dist/cjs/data-structures/base/iterable-element-base.js +149 -107
  7. package/dist/cjs/data-structures/base/iterable-element-base.js.map +1 -1
  8. package/dist/cjs/data-structures/base/iterable-entry-base.d.ts +95 -119
  9. package/dist/cjs/data-structures/base/iterable-entry-base.js +59 -116
  10. package/dist/cjs/data-structures/base/iterable-entry-base.js.map +1 -1
  11. package/dist/cjs/data-structures/base/linear-base.d.ts +250 -192
  12. package/dist/cjs/data-structures/base/linear-base.js +137 -274
  13. package/dist/cjs/data-structures/base/linear-base.js.map +1 -1
  14. package/dist/cjs/data-structures/binary-tree/avl-tree-counter.d.ts +126 -158
  15. package/dist/cjs/data-structures/binary-tree/avl-tree-counter.js +171 -205
  16. package/dist/cjs/data-structures/binary-tree/avl-tree-counter.js.map +1 -1
  17. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.d.ts +100 -69
  18. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js +135 -87
  19. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js.map +1 -1
  20. package/dist/cjs/data-structures/binary-tree/avl-tree.d.ts +138 -149
  21. package/dist/cjs/data-structures/binary-tree/avl-tree.js +208 -195
  22. package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +1 -1
  23. package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +476 -632
  24. package/dist/cjs/data-structures/binary-tree/binary-tree.js +594 -865
  25. package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +1 -1
  26. package/dist/cjs/data-structures/binary-tree/bst.d.ts +258 -306
  27. package/dist/cjs/data-structures/binary-tree/bst.js +505 -481
  28. package/dist/cjs/data-structures/binary-tree/bst.js.map +1 -1
  29. package/dist/cjs/data-structures/binary-tree/red-black-tree.d.ts +107 -179
  30. package/dist/cjs/data-structures/binary-tree/red-black-tree.js +114 -209
  31. package/dist/cjs/data-structures/binary-tree/red-black-tree.js.map +1 -1
  32. package/dist/cjs/data-structures/binary-tree/tree-counter.d.ts +132 -154
  33. package/dist/cjs/data-structures/binary-tree/tree-counter.js +172 -203
  34. package/dist/cjs/data-structures/binary-tree/tree-counter.js.map +1 -1
  35. package/dist/cjs/data-structures/binary-tree/tree-multi-map.d.ts +72 -69
  36. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js +105 -85
  37. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js.map +1 -1
  38. package/dist/cjs/data-structures/graph/abstract-graph.d.ts +238 -233
  39. package/dist/cjs/data-structures/graph/abstract-graph.js +267 -237
  40. package/dist/cjs/data-structures/graph/abstract-graph.js.map +1 -1
  41. package/dist/cjs/data-structures/graph/directed-graph.d.ts +108 -224
  42. package/dist/cjs/data-structures/graph/directed-graph.js +146 -233
  43. package/dist/cjs/data-structures/graph/directed-graph.js.map +1 -1
  44. package/dist/cjs/data-structures/graph/map-graph.d.ts +49 -55
  45. package/dist/cjs/data-structures/graph/map-graph.js +56 -59
  46. package/dist/cjs/data-structures/graph/map-graph.js.map +1 -1
  47. package/dist/cjs/data-structures/graph/undirected-graph.d.ts +103 -146
  48. package/dist/cjs/data-structures/graph/undirected-graph.js +129 -149
  49. package/dist/cjs/data-structures/graph/undirected-graph.js.map +1 -1
  50. package/dist/cjs/data-structures/hash/hash-map.d.ts +164 -338
  51. package/dist/cjs/data-structures/hash/hash-map.js +270 -457
  52. package/dist/cjs/data-structures/hash/hash-map.js.map +1 -1
  53. package/dist/cjs/data-structures/heap/heap.d.ts +214 -289
  54. package/dist/cjs/data-structures/heap/heap.js +340 -349
  55. package/dist/cjs/data-structures/heap/heap.js.map +1 -1
  56. package/dist/cjs/data-structures/heap/max-heap.d.ts +11 -47
  57. package/dist/cjs/data-structures/heap/max-heap.js +11 -66
  58. package/dist/cjs/data-structures/heap/max-heap.js.map +1 -1
  59. package/dist/cjs/data-structures/heap/min-heap.d.ts +12 -47
  60. package/dist/cjs/data-structures/heap/min-heap.js +11 -66
  61. package/dist/cjs/data-structures/heap/min-heap.js.map +1 -1
  62. package/dist/cjs/data-structures/linked-list/doubly-linked-list.d.ts +231 -347
  63. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js +368 -494
  64. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +1 -1
  65. package/dist/cjs/data-structures/linked-list/singly-linked-list.d.ts +261 -310
  66. package/dist/cjs/data-structures/linked-list/singly-linked-list.js +447 -466
  67. package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +1 -1
  68. package/dist/cjs/data-structures/linked-list/skip-linked-list.d.ts +0 -107
  69. package/dist/cjs/data-structures/linked-list/skip-linked-list.js +0 -100
  70. package/dist/cjs/data-structures/linked-list/skip-linked-list.js.map +1 -1
  71. package/dist/cjs/data-structures/priority-queue/max-priority-queue.d.ts +12 -56
  72. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js +11 -78
  73. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js.map +1 -1
  74. package/dist/cjs/data-structures/priority-queue/min-priority-queue.d.ts +11 -57
  75. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js +10 -79
  76. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js.map +1 -1
  77. package/dist/cjs/data-structures/priority-queue/priority-queue.d.ts +2 -61
  78. package/dist/cjs/data-structures/priority-queue/priority-queue.js +8 -83
  79. package/dist/cjs/data-structures/priority-queue/priority-queue.js.map +1 -1
  80. package/dist/cjs/data-structures/queue/deque.d.ts +227 -254
  81. package/dist/cjs/data-structures/queue/deque.js +309 -348
  82. package/dist/cjs/data-structures/queue/deque.js.map +1 -1
  83. package/dist/cjs/data-structures/queue/queue.d.ts +180 -201
  84. package/dist/cjs/data-structures/queue/queue.js +265 -248
  85. package/dist/cjs/data-structures/queue/queue.js.map +1 -1
  86. package/dist/cjs/data-structures/stack/stack.d.ts +124 -102
  87. package/dist/cjs/data-structures/stack/stack.js +181 -125
  88. package/dist/cjs/data-structures/stack/stack.js.map +1 -1
  89. package/dist/cjs/data-structures/trie/trie.d.ts +164 -165
  90. package/dist/cjs/data-structures/trie/trie.js +189 -172
  91. package/dist/cjs/data-structures/trie/trie.js.map +1 -1
  92. package/dist/cjs/interfaces/binary-tree.d.ts +56 -6
  93. package/dist/cjs/interfaces/graph.d.ts +16 -0
  94. package/dist/cjs/types/data-structures/base/base.d.ts +1 -1
  95. package/dist/cjs/types/data-structures/graph/abstract-graph.d.ts +4 -0
  96. package/dist/cjs/types/utils/utils.d.ts +1 -0
  97. package/dist/cjs/utils/utils.d.ts +1 -1
  98. package/dist/cjs/utils/utils.js +2 -1
  99. package/dist/cjs/utils/utils.js.map +1 -1
  100. package/dist/esm/data-structures/base/iterable-element-base.d.ts +186 -83
  101. package/dist/esm/data-structures/base/iterable-element-base.js +155 -107
  102. package/dist/esm/data-structures/base/iterable-element-base.js.map +1 -1
  103. package/dist/esm/data-structures/base/iterable-entry-base.d.ts +95 -119
  104. package/dist/esm/data-structures/base/iterable-entry-base.js +59 -116
  105. package/dist/esm/data-structures/base/iterable-entry-base.js.map +1 -1
  106. package/dist/esm/data-structures/base/linear-base.d.ts +250 -192
  107. package/dist/esm/data-structures/base/linear-base.js +137 -274
  108. package/dist/esm/data-structures/base/linear-base.js.map +1 -1
  109. package/dist/esm/data-structures/binary-tree/avl-tree-counter.d.ts +126 -158
  110. package/dist/esm/data-structures/binary-tree/avl-tree-counter.js +171 -212
  111. package/dist/esm/data-structures/binary-tree/avl-tree-counter.js.map +1 -1
  112. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.d.ts +100 -69
  113. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.js +133 -94
  114. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.js.map +1 -1
  115. package/dist/esm/data-structures/binary-tree/avl-tree.d.ts +138 -149
  116. package/dist/esm/data-structures/binary-tree/avl-tree.js +206 -200
  117. package/dist/esm/data-structures/binary-tree/avl-tree.js.map +1 -1
  118. package/dist/esm/data-structures/binary-tree/binary-tree.d.ts +476 -632
  119. package/dist/esm/data-structures/binary-tree/binary-tree.js +598 -874
  120. package/dist/esm/data-structures/binary-tree/binary-tree.js.map +1 -1
  121. package/dist/esm/data-structures/binary-tree/bst.d.ts +258 -306
  122. package/dist/esm/data-structures/binary-tree/bst.js +507 -487
  123. package/dist/esm/data-structures/binary-tree/bst.js.map +1 -1
  124. package/dist/esm/data-structures/binary-tree/red-black-tree.d.ts +107 -179
  125. package/dist/esm/data-structures/binary-tree/red-black-tree.js +114 -215
  126. package/dist/esm/data-structures/binary-tree/red-black-tree.js.map +1 -1
  127. package/dist/esm/data-structures/binary-tree/tree-counter.d.ts +132 -154
  128. package/dist/esm/data-structures/binary-tree/tree-counter.js +175 -209
  129. package/dist/esm/data-structures/binary-tree/tree-counter.js.map +1 -1
  130. package/dist/esm/data-structures/binary-tree/tree-multi-map.d.ts +72 -69
  131. package/dist/esm/data-structures/binary-tree/tree-multi-map.js +103 -92
  132. package/dist/esm/data-structures/binary-tree/tree-multi-map.js.map +1 -1
  133. package/dist/esm/data-structures/graph/abstract-graph.d.ts +238 -233
  134. package/dist/esm/data-structures/graph/abstract-graph.js +267 -237
  135. package/dist/esm/data-structures/graph/abstract-graph.js.map +1 -1
  136. package/dist/esm/data-structures/graph/directed-graph.d.ts +108 -224
  137. package/dist/esm/data-structures/graph/directed-graph.js +145 -233
  138. package/dist/esm/data-structures/graph/directed-graph.js.map +1 -1
  139. package/dist/esm/data-structures/graph/map-graph.d.ts +49 -55
  140. package/dist/esm/data-structures/graph/map-graph.js +56 -59
  141. package/dist/esm/data-structures/graph/map-graph.js.map +1 -1
  142. package/dist/esm/data-structures/graph/undirected-graph.d.ts +103 -146
  143. package/dist/esm/data-structures/graph/undirected-graph.js +128 -149
  144. package/dist/esm/data-structures/graph/undirected-graph.js.map +1 -1
  145. package/dist/esm/data-structures/hash/hash-map.d.ts +164 -338
  146. package/dist/esm/data-structures/hash/hash-map.js +270 -457
  147. package/dist/esm/data-structures/hash/hash-map.js.map +1 -1
  148. package/dist/esm/data-structures/heap/heap.d.ts +214 -289
  149. package/dist/esm/data-structures/heap/heap.js +329 -349
  150. package/dist/esm/data-structures/heap/heap.js.map +1 -1
  151. package/dist/esm/data-structures/heap/max-heap.d.ts +11 -47
  152. package/dist/esm/data-structures/heap/max-heap.js +11 -66
  153. package/dist/esm/data-structures/heap/max-heap.js.map +1 -1
  154. package/dist/esm/data-structures/heap/min-heap.d.ts +12 -47
  155. package/dist/esm/data-structures/heap/min-heap.js +11 -66
  156. package/dist/esm/data-structures/heap/min-heap.js.map +1 -1
  157. package/dist/esm/data-structures/linked-list/doubly-linked-list.d.ts +231 -347
  158. package/dist/esm/data-structures/linked-list/doubly-linked-list.js +368 -495
  159. package/dist/esm/data-structures/linked-list/doubly-linked-list.js.map +1 -1
  160. package/dist/esm/data-structures/linked-list/singly-linked-list.d.ts +261 -310
  161. package/dist/esm/data-structures/linked-list/singly-linked-list.js +448 -467
  162. package/dist/esm/data-structures/linked-list/singly-linked-list.js.map +1 -1
  163. package/dist/esm/data-structures/linked-list/skip-linked-list.d.ts +0 -107
  164. package/dist/esm/data-structures/linked-list/skip-linked-list.js +0 -100
  165. package/dist/esm/data-structures/linked-list/skip-linked-list.js.map +1 -1
  166. package/dist/esm/data-structures/priority-queue/max-priority-queue.d.ts +12 -56
  167. package/dist/esm/data-structures/priority-queue/max-priority-queue.js +11 -78
  168. package/dist/esm/data-structures/priority-queue/max-priority-queue.js.map +1 -1
  169. package/dist/esm/data-structures/priority-queue/min-priority-queue.d.ts +11 -57
  170. package/dist/esm/data-structures/priority-queue/min-priority-queue.js +10 -79
  171. package/dist/esm/data-structures/priority-queue/min-priority-queue.js.map +1 -1
  172. package/dist/esm/data-structures/priority-queue/priority-queue.d.ts +2 -61
  173. package/dist/esm/data-structures/priority-queue/priority-queue.js +8 -83
  174. package/dist/esm/data-structures/priority-queue/priority-queue.js.map +1 -1
  175. package/dist/esm/data-structures/queue/deque.d.ts +227 -254
  176. package/dist/esm/data-structures/queue/deque.js +313 -348
  177. package/dist/esm/data-structures/queue/deque.js.map +1 -1
  178. package/dist/esm/data-structures/queue/queue.d.ts +180 -201
  179. package/dist/esm/data-structures/queue/queue.js +263 -248
  180. package/dist/esm/data-structures/queue/queue.js.map +1 -1
  181. package/dist/esm/data-structures/stack/stack.d.ts +124 -102
  182. package/dist/esm/data-structures/stack/stack.js +181 -125
  183. package/dist/esm/data-structures/stack/stack.js.map +1 -1
  184. package/dist/esm/data-structures/trie/trie.d.ts +164 -165
  185. package/dist/esm/data-structures/trie/trie.js +193 -172
  186. package/dist/esm/data-structures/trie/trie.js.map +1 -1
  187. package/dist/esm/interfaces/binary-tree.d.ts +56 -6
  188. package/dist/esm/interfaces/graph.d.ts +16 -0
  189. package/dist/esm/types/data-structures/base/base.d.ts +1 -1
  190. package/dist/esm/types/data-structures/graph/abstract-graph.d.ts +4 -0
  191. package/dist/esm/types/utils/utils.d.ts +1 -0
  192. package/dist/esm/utils/utils.d.ts +1 -1
  193. package/dist/esm/utils/utils.js +2 -1
  194. package/dist/esm/utils/utils.js.map +1 -1
  195. package/dist/umd/data-structure-typed.js +4685 -6477
  196. package/dist/umd/data-structure-typed.min.js +8 -6
  197. package/dist/umd/data-structure-typed.min.js.map +1 -1
  198. package/package.json +3 -4
  199. package/src/data-structures/base/iterable-element-base.ts +238 -115
  200. package/src/data-structures/base/iterable-entry-base.ts +96 -120
  201. package/src/data-structures/base/linear-base.ts +271 -277
  202. package/src/data-structures/binary-tree/avl-tree-counter.ts +198 -216
  203. package/src/data-structures/binary-tree/avl-tree-multi-map.ts +192 -101
  204. package/src/data-structures/binary-tree/avl-tree.ts +239 -206
  205. package/src/data-structures/binary-tree/binary-tree.ts +660 -889
  206. package/src/data-structures/binary-tree/bst.ts +568 -570
  207. package/src/data-structures/binary-tree/red-black-tree.ts +161 -222
  208. package/src/data-structures/binary-tree/tree-counter.ts +199 -218
  209. package/src/data-structures/binary-tree/tree-multi-map.ts +131 -97
  210. package/src/data-structures/graph/abstract-graph.ts +339 -264
  211. package/src/data-structures/graph/directed-graph.ts +146 -236
  212. package/src/data-structures/graph/map-graph.ts +63 -60
  213. package/src/data-structures/graph/undirected-graph.ts +129 -152
  214. package/src/data-structures/hash/hash-map.ts +274 -496
  215. package/src/data-structures/heap/heap.ts +389 -402
  216. package/src/data-structures/heap/max-heap.ts +12 -76
  217. package/src/data-structures/heap/min-heap.ts +13 -76
  218. package/src/data-structures/linked-list/doubly-linked-list.ts +426 -530
  219. package/src/data-structures/linked-list/singly-linked-list.ts +495 -517
  220. package/src/data-structures/linked-list/skip-linked-list.ts +1 -108
  221. package/src/data-structures/priority-queue/max-priority-queue.ts +12 -87
  222. package/src/data-structures/priority-queue/min-priority-queue.ts +11 -88
  223. package/src/data-structures/priority-queue/priority-queue.ts +3 -92
  224. package/src/data-structures/queue/deque.ts +381 -357
  225. package/src/data-structures/queue/queue.ts +310 -264
  226. package/src/data-structures/stack/stack.ts +217 -131
  227. package/src/data-structures/trie/trie.ts +240 -175
  228. package/src/interfaces/binary-tree.ts +240 -6
  229. package/src/interfaces/graph.ts +37 -0
  230. package/src/types/data-structures/base/base.ts +5 -5
  231. package/src/types/data-structures/graph/abstract-graph.ts +5 -0
  232. package/src/types/utils/utils.ts +2 -0
  233. package/src/utils/utils.ts +9 -14
  234. package/test/integration/index.html +1 -1
  235. package/test/performance/benchmark-runner.ts +528 -0
  236. package/test/performance/reportor.mjs +43 -43
  237. package/test/performance/runner-config.json +39 -0
  238. package/test/performance/single-suite-runner.ts +69 -0
  239. package/test/unit/data-structures/binary-tree/avl-tree-counter.test.ts +3 -3
  240. package/test/unit/data-structures/binary-tree/avl-tree-multi-map.test.ts +5 -5
  241. package/test/unit/data-structures/binary-tree/avl-tree.test.ts +4 -4
  242. package/test/unit/data-structures/binary-tree/binary-tree.test.ts +350 -90
  243. package/test/unit/data-structures/binary-tree/bst.test.ts +12 -9
  244. package/test/unit/data-structures/binary-tree/red-black-tree.test.ts +2 -2
  245. package/test/unit/data-structures/binary-tree/tree-counter.test.ts +25 -24
  246. package/test/unit/data-structures/binary-tree/tree-multi-map.test.ts +3 -3
  247. package/test/unit/data-structures/graph/abstract-graph.test.ts +0 -4
  248. package/test/unit/data-structures/graph/directed-graph.test.ts +1 -1
  249. package/test/unit/data-structures/heap/heap.test.ts +14 -21
  250. package/test/unit/data-structures/heap/max-heap.test.ts +5 -9
  251. package/test/unit/data-structures/heap/min-heap.test.ts +1 -4
  252. package/test/unit/data-structures/linked-list/doubly-linked-list.test.ts +14 -14
  253. package/test/unit/data-structures/linked-list/singly-linked-list.test.ts +0 -7
  254. package/test/unit/data-structures/priority-queue/max-priority-queue.test.ts +8 -11
  255. package/test/unit/data-structures/priority-queue/min-priority-queue.test.ts +1 -4
  256. package/test/unit/data-structures/priority-queue/priority-queue.test.ts +1 -4
  257. package/test/unit/data-structures/queue/queue.test.ts +4 -5
  258. package/test/unit/utils/utils.test.ts +0 -1
  259. package/test/performance/data-structures/binary-tree/avl-tree.test.mjs +0 -71
  260. package/test/performance/data-structures/binary-tree/red-black-tree.test.mjs +0 -81
@@ -3,356 +3,324 @@
3
3
  "benchmarks": [
4
4
  {
5
5
  "test name": "100,000 add",
6
- "time taken (ms)": "3.01",
6
+ "time taken (ms)": "4.54",
7
7
  "sample mean (secs)": "0.00",
8
- "sample deviation": "1.05e-4"
8
+ "sample deviation": "1.09e-4"
9
9
  },
10
10
  {
11
11
  "test name": "100,000 add & poll",
12
- "time taken (ms)": "16.57",
12
+ "time taken (ms)": "16.99",
13
13
  "sample mean (secs)": "0.02",
14
- "sample deviation": "4.12e-4"
14
+ "sample deviation": "4.39e-4"
15
15
  }
16
- ],
17
- "testName": "heap"
16
+ ]
18
17
  },
19
18
  "avl-tree": {
20
19
  "benchmarks": [
21
20
  {
22
21
  "test name": "100,000 add randomly",
23
- "time taken (ms)": "276.06",
24
- "sample mean (secs)": "0.28",
25
- "sample deviation": "0.00"
22
+ "time taken (ms)": "323.84",
23
+ "sample mean (secs)": "0.32",
24
+ "sample deviation": "0.01"
26
25
  },
27
26
  {
28
27
  "test name": "100,000 add",
29
- "time taken (ms)": "247.11",
30
- "sample mean (secs)": "0.25",
31
- "sample deviation": "0.01"
28
+ "time taken (ms)": "297.64",
29
+ "sample mean (secs)": "0.30",
30
+ "sample deviation": "0.00"
32
31
  },
33
32
  {
34
33
  "test name": "100,000 get",
35
- "time taken (ms)": "0.28",
36
- "sample mean (secs)": "2.82e-4",
37
- "sample deviation": "9.27e-5"
34
+ "time taken (ms)": "0.26",
35
+ "sample mean (secs)": "2.58e-4",
36
+ "sample deviation": "4.70e-6"
38
37
  },
39
38
  {
40
39
  "test name": "100,000 getNode",
41
- "time taken (ms)": "168.47",
42
- "sample mean (secs)": "0.17",
43
- "sample deviation": "0.01"
40
+ "time taken (ms)": "164.61",
41
+ "sample mean (secs)": "0.16",
42
+ "sample deviation": "0.00"
44
43
  },
45
44
  {
46
45
  "test name": "100,000 iterator",
47
- "time taken (ms)": "12.84",
46
+ "time taken (ms)": "13.93",
48
47
  "sample mean (secs)": "0.01",
49
48
  "sample deviation": "0.00"
50
49
  },
51
50
  {
52
51
  "test name": "100,000 add & delete orderly",
53
- "time taken (ms)": "385.64",
54
- "sample mean (secs)": "0.39",
52
+ "time taken (ms)": "435.66",
53
+ "sample mean (secs)": "0.44",
55
54
  "sample deviation": "0.00"
56
55
  },
57
56
  {
58
57
  "test name": "100,000 add & delete randomly",
59
- "time taken (ms)": "501.31",
60
- "sample mean (secs)": "0.50",
58
+ "time taken (ms)": "542.69",
59
+ "sample mean (secs)": "0.54",
61
60
  "sample deviation": "0.01"
62
61
  }
63
- ],
64
- "testName": "avl-tree"
62
+ ]
65
63
  },
66
64
  "red-black-tree": {
67
65
  "benchmarks": [
68
66
  {
69
67
  "test name": "100,000 add randomly",
70
- "time taken (ms)": "78.51",
71
- "sample mean (secs)": "0.08",
68
+ "time taken (ms)": "50.51",
69
+ "sample mean (secs)": "0.05",
72
70
  "sample deviation": "0.00"
73
71
  },
74
72
  {
75
73
  "test name": "100,000 add",
76
- "time taken (ms)": "104.83",
77
- "sample mean (secs)": "0.10",
78
- "sample deviation": "0.00"
74
+ "time taken (ms)": "55.64",
75
+ "sample mean (secs)": "0.06",
76
+ "sample deviation": "9.96e-4"
79
77
  },
80
78
  {
81
79
  "test name": "100,000 get",
82
- "time taken (ms)": "0.53",
83
- "sample mean (secs)": "5.26e-4",
84
- "sample deviation": "7.38e-5"
80
+ "time taken (ms)": "0.56",
81
+ "sample mean (secs)": "5.62e-4",
82
+ "sample deviation": "8.00e-6"
85
83
  },
86
84
  {
87
85
  "test name": "100,000 getNode",
88
- "time taken (ms)": "249.02",
89
- "sample mean (secs)": "0.25",
90
- "sample deviation": "0.01"
86
+ "time taken (ms)": "173.91",
87
+ "sample mean (secs)": "0.17",
88
+ "sample deviation": "0.00"
91
89
  },
92
90
  {
93
91
  "test name": "100,000 node mode add randomly",
94
- "time taken (ms)": "77.15",
95
- "sample mean (secs)": "0.08",
92
+ "time taken (ms)": "50.58",
93
+ "sample mean (secs)": "0.05",
96
94
  "sample deviation": "0.00"
97
95
  },
98
96
  {
99
97
  "test name": "100,000 node mode get",
100
- "time taken (ms)": "253.61",
101
- "sample mean (secs)": "0.25",
102
- "sample deviation": "0.01"
98
+ "time taken (ms)": "177.74",
99
+ "sample mean (secs)": "0.18",
100
+ "sample deviation": "0.00"
103
101
  },
104
102
  {
105
103
  "test name": "100,000 iterator",
106
- "time taken (ms)": "13.23",
104
+ "time taken (ms)": "13.64",
107
105
  "sample mean (secs)": "0.01",
108
106
  "sample deviation": "0.00"
109
107
  },
110
108
  {
111
109
  "test name": "100,000 add & delete orderly",
112
- "time taken (ms)": "226.81",
113
- "sample mean (secs)": "0.23",
110
+ "time taken (ms)": "137.34",
111
+ "sample mean (secs)": "0.14",
114
112
  "sample deviation": "0.00"
115
113
  },
116
114
  {
117
115
  "test name": "100,000 add & delete randomly",
118
- "time taken (ms)": "325.56",
119
- "sample mean (secs)": "0.33",
120
- "sample deviation": "0.00"
116
+ "time taken (ms)": "227.78",
117
+ "sample mean (secs)": "0.23",
118
+ "sample deviation": "0.01"
121
119
  }
122
- ],
123
- "testName": "red-black-tree"
120
+ ]
124
121
  },
125
- "doubly-linked-list": {
122
+ "hash-map": {
126
123
  "benchmarks": [
127
124
  {
128
- "test name": "1,000,000 push",
129
- "time taken (ms)": "109.12",
130
- "sample mean (secs)": "0.11",
125
+ "test name": "1,000,000 set",
126
+ "time taken (ms)": "42.03",
127
+ "sample mean (secs)": "0.04",
128
+ "sample deviation": "0.01"
129
+ },
130
+ {
131
+ "test name": "Native JS Map 1,000,000 set",
132
+ "time taken (ms)": "143.77",
133
+ "sample mean (secs)": "0.14",
134
+ "sample deviation": "0.01"
135
+ },
136
+ {
137
+ "test name": "Native JS Set 1,000,000 add",
138
+ "time taken (ms)": "116.02",
139
+ "sample mean (secs)": "0.12",
131
140
  "sample deviation": "0.02"
132
141
  },
133
142
  {
134
- "test name": "1,000,000 unshift",
135
- "time taken (ms)": "105.65",
136
- "sample mean (secs)": "0.11",
143
+ "test name": "1,000,000 set & get",
144
+ "time taken (ms)": "43.68",
145
+ "sample mean (secs)": "0.04",
137
146
  "sample deviation": "0.01"
138
147
  },
139
148
  {
140
- "test name": "1,000,000 unshift & shift",
141
- "time taken (ms)": "96.20",
142
- "sample mean (secs)": "0.10",
149
+ "test name": "Native JS Map 1,000,000 set & get",
150
+ "time taken (ms)": "192.46",
151
+ "sample mean (secs)": "0.19",
143
152
  "sample deviation": "0.01"
144
153
  },
145
154
  {
146
- "test name": "1,000,000 addBefore",
147
- "time taken (ms)": "157.94",
155
+ "test name": "Native JS Set 1,000,000 add & has",
156
+ "time taken (ms)": "160.85",
148
157
  "sample mean (secs)": "0.16",
158
+ "sample deviation": "0.01"
159
+ },
160
+ {
161
+ "test name": "1,000,000 ObjKey set & get",
162
+ "time taken (ms)": "233.37",
163
+ "sample mean (secs)": "0.23",
164
+ "sample deviation": "0.03"
165
+ },
166
+ {
167
+ "test name": "Native JS Map 1,000,000 ObjKey set & get",
168
+ "time taken (ms)": "212.39",
169
+ "sample mean (secs)": "0.21",
149
170
  "sample deviation": "0.03"
171
+ },
172
+ {
173
+ "test name": "Native JS Set 1,000,000 ObjKey add & has",
174
+ "time taken (ms)": "186.55",
175
+ "sample mean (secs)": "0.19",
176
+ "sample deviation": "0.02"
150
177
  }
151
- ],
152
- "testName": "doubly-linked-list"
178
+ ]
153
179
  },
154
180
  "directed-graph": {
155
181
  "benchmarks": [
156
182
  {
157
183
  "test name": "1,000 addVertex",
158
184
  "time taken (ms)": "0.05",
159
- "sample mean (secs)": "4.73e-5",
160
- "sample deviation": "1.24e-6"
185
+ "sample mean (secs)": "4.69e-5",
186
+ "sample deviation": "1.05e-6"
161
187
  },
162
188
  {
163
189
  "test name": "1,000 addEdge",
164
- "time taken (ms)": "2.96",
190
+ "time taken (ms)": "2.97",
165
191
  "sample mean (secs)": "0.00",
166
- "sample deviation": "9.68e-5"
192
+ "sample deviation": "2.82e-4"
167
193
  },
168
194
  {
169
195
  "test name": "1,000 getVertex",
170
- "time taken (ms)": "0.05",
171
- "sample mean (secs)": "4.70e-5",
172
- "sample deviation": "1.27e-6"
196
+ "time taken (ms)": "0.04",
197
+ "sample mean (secs)": "3.70e-5",
198
+ "sample deviation": "8.00e-7"
173
199
  },
174
200
  {
175
201
  "test name": "1,000 getEdge",
176
- "time taken (ms)": "44.92",
177
- "sample mean (secs)": "0.04",
202
+ "time taken (ms)": "45.20",
203
+ "sample mean (secs)": "0.05",
178
204
  "sample deviation": "0.01"
179
205
  },
180
206
  {
181
207
  "test name": "tarjan",
182
- "time taken (ms)": "257.57",
183
- "sample mean (secs)": "0.26",
184
- "sample deviation": "0.02"
208
+ "time taken (ms)": "246.50",
209
+ "sample mean (secs)": "0.25",
210
+ "sample deviation": "0.01"
185
211
  },
186
212
  {
187
213
  "test name": "topologicalSort",
188
- "time taken (ms)": "207.12",
189
- "sample mean (secs)": "0.21",
214
+ "time taken (ms)": "201.36",
215
+ "sample mean (secs)": "0.20",
190
216
  "sample deviation": "0.01"
191
217
  }
192
- ],
193
- "testName": "directed-graph"
218
+ ]
194
219
  },
195
220
  "queue": {
196
221
  "benchmarks": [
197
222
  {
198
223
  "test name": "1,000,000 push",
199
- "time taken (ms)": "25.86",
200
- "sample mean (secs)": "0.03",
201
- "sample deviation": "0.01"
224
+ "time taken (ms)": "24.89",
225
+ "sample mean (secs)": "0.02",
226
+ "sample deviation": "0.00"
202
227
  },
203
228
  {
204
229
  "test name": "100,000 push & shift",
205
- "time taken (ms)": "2.52",
230
+ "time taken (ms)": "2.77",
206
231
  "sample mean (secs)": "0.00",
207
- "sample deviation": "0.00"
232
+ "sample deviation": "2.63e-4"
208
233
  },
209
234
  {
210
235
  "test name": "Native JS Array 100,000 push & shift",
211
- "time taken (ms)": "902.25",
212
- "sample mean (secs)": "0.90",
213
- "sample deviation": "0.00"
236
+ "time taken (ms)": "1172.87",
237
+ "sample mean (secs)": "1.17",
238
+ "sample deviation": "0.09"
214
239
  }
215
- ],
216
- "testName": "queue"
240
+ ]
217
241
  },
218
242
  "deque": {
219
243
  "benchmarks": [
220
244
  {
221
245
  "test name": "1,000,000 push",
222
- "time taken (ms)": "10.14",
246
+ "time taken (ms)": "9.76",
223
247
  "sample mean (secs)": "0.01",
224
- "sample deviation": "0.00"
248
+ "sample deviation": "6.06e-4"
225
249
  },
226
250
  {
227
251
  "test name": "1,000,000 push & pop",
228
- "time taken (ms)": "14.13",
252
+ "time taken (ms)": "12.80",
229
253
  "sample mean (secs)": "0.01",
230
- "sample deviation": "0.01"
254
+ "sample deviation": "4.62e-4"
231
255
  },
232
256
  {
233
257
  "test name": "1,000,000 push & shift",
234
- "time taken (ms)": "13.35",
258
+ "time taken (ms)": "13.62",
235
259
  "sample mean (secs)": "0.01",
236
- "sample deviation": "0.01"
260
+ "sample deviation": "4.97e-4"
237
261
  },
238
262
  {
239
263
  "test name": "100,000 push & shift",
240
- "time taken (ms)": "1.34",
264
+ "time taken (ms)": "1.39",
241
265
  "sample mean (secs)": "0.00",
242
- "sample deviation": "6.86e-4"
266
+ "sample deviation": "4.95e-5"
243
267
  },
244
268
  {
245
269
  "test name": "Native JS Array 100,000 push & shift",
246
- "time taken (ms)": "904.80",
247
- "sample mean (secs)": "0.90",
248
- "sample deviation": "0.01"
270
+ "time taken (ms)": "1174.62",
271
+ "sample mean (secs)": "1.17",
272
+ "sample deviation": "0.24"
249
273
  },
250
274
  {
251
275
  "test name": "100,000 unshift & shift",
252
- "time taken (ms)": "1.21",
276
+ "time taken (ms)": "1.37",
253
277
  "sample mean (secs)": "0.00",
254
- "sample deviation": "5.28e-4"
278
+ "sample deviation": "5.62e-5"
255
279
  },
256
280
  {
257
281
  "test name": "Native JS Array 100,000 unshift & shift",
258
- "time taken (ms)": "1801.73",
259
- "sample mean (secs)": "1.80",
260
- "sample deviation": "0.01"
282
+ "time taken (ms)": "2022.04",
283
+ "sample mean (secs)": "2.02",
284
+ "sample deviation": "0.16"
261
285
  }
262
- ],
263
- "testName": "deque"
286
+ ]
264
287
  },
265
- "hash-map": {
266
- "benchmarks": [
267
- {
268
- "test name": "1,000,000 set",
269
- "time taken (ms)": "48.91",
270
- "sample mean (secs)": "0.05",
271
- "sample deviation": "0.02"
272
- },
273
- {
274
- "test name": "Native JS Map 1,000,000 set",
275
- "time taken (ms)": "141.21",
276
- "sample mean (secs)": "0.14",
277
- "sample deviation": "0.02"
278
- },
279
- {
280
- "test name": "Native JS Set 1,000,000 add",
281
- "time taken (ms)": "116.73",
282
- "sample mean (secs)": "0.12",
283
- "sample deviation": "0.03"
284
- },
285
- {
286
- "test name": "1,000,000 set & get",
287
- "time taken (ms)": "40.73",
288
- "sample mean (secs)": "0.04",
289
- "sample deviation": "0.01"
290
- },
291
- {
292
- "test name": "Native JS Map 1,000,000 set & get",
293
- "time taken (ms)": "196.24",
294
- "sample mean (secs)": "0.20",
295
- "sample deviation": "0.02"
296
- },
297
- {
298
- "test name": "Native JS Set 1,000,000 add & has",
299
- "time taken (ms)": "158.72",
300
- "sample mean (secs)": "0.16",
301
- "sample deviation": "0.02"
302
- },
303
- {
304
- "test name": "1,000,000 ObjKey set & get",
305
- "time taken (ms)": "242.77",
306
- "sample mean (secs)": "0.24",
307
- "sample deviation": "0.08"
308
- },
309
- {
310
- "test name": "Native JS Map 1,000,000 ObjKey set & get",
311
- "time taken (ms)": "231.61",
312
- "sample mean (secs)": "0.23",
313
- "sample deviation": "0.09"
314
- },
315
- {
316
- "test name": "Native JS Set 1,000,000 ObjKey add & has",
317
- "time taken (ms)": "177.41",
318
- "sample mean (secs)": "0.18",
319
- "sample deviation": "0.05"
320
- }
321
- ],
322
- "testName": "hash-map"
288
+ "bst": {
289
+ "benchmarks": []
323
290
  },
324
291
  "trie": {
325
292
  "benchmarks": [
326
293
  {
327
294
  "test name": "100,000 push",
328
- "time taken (ms)": "21.20",
329
- "sample mean (secs)": "0.02",
295
+ "time taken (ms)": "28.21",
296
+ "sample mean (secs)": "0.03",
330
297
  "sample deviation": "0.00"
331
298
  },
332
299
  {
333
300
  "test name": "100,000 getWords",
334
- "time taken (ms)": "39.18",
301
+ "time taken (ms)": "38.86",
335
302
  "sample mean (secs)": "0.04",
336
303
  "sample deviation": "0.00"
337
304
  }
338
- ],
339
- "testName": "trie"
305
+ ]
340
306
  },
341
307
  "stack": {
342
308
  "benchmarks": [
343
309
  {
344
310
  "test name": "1,000,000 push",
345
- "time taken (ms)": "22.12",
346
- "sample mean (secs)": "0.02",
347
- "sample deviation": "0.01"
311
+ "time taken (ms)": "25.11",
312
+ "sample mean (secs)": "0.03",
313
+ "sample deviation": "0.00"
348
314
  },
349
315
  {
350
316
  "test name": "1,000,000 push & pop",
351
- "time taken (ms)": "25.51",
317
+ "time taken (ms)": "27.18",
352
318
  "sample mean (secs)": "0.03",
353
- "sample deviation": "0.01"
319
+ "sample deviation": "0.00"
354
320
  }
355
- ],
356
- "testName": "stack"
321
+ ]
322
+ },
323
+ "binary-tree": {
324
+ "benchmarks": []
357
325
  }
358
326
  }