Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

data-structure-typed

Package Overview
Dependencies
Maintainers
1
Versions
201
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-structure-typed - npm Package Compare versions

Comparing version 1.41.6 to 1.41.7

test/config.ts

222

benchmark/report.json

@@ -6,31 +6,31 @@ {

"test name": "1000 add randomly",
"time taken (ms)": "2.23",
"executions per sec": "448.62",
"time taken (ms)": "2.28",
"executions per sec": "438.38",
"executed times": "23",
"sample mean (secs)": "0.00",
"sample deviation": "5.02e-5"
"sample deviation": "2.56e-5"
},
{
"test name": "1000 add & delete randomly",
"time taken (ms)": "5.04",
"executions per sec": "198.31",
"time taken (ms)": "5.16",
"executions per sec": "193.94",
"executed times": "11",
"sample mean (secs)": "0.01",
"sample deviation": "1.30e-4"
"sample deviation": "7.96e-4"
},
{
"test name": "1000 addMany",
"time taken (ms)": "3.11",
"executions per sec": "321.43",
"time taken (ms)": "3.05",
"executions per sec": "328.30",
"executed times": "17",
"sample mean (secs)": "0.00",
"sample deviation": "3.26e-5"
"sample deviation": "3.13e-4"
},
{
"test name": "1000 get",
"time taken (ms)": "2.03",
"executions per sec": "493.26",
"executed times": "26",
"time taken (ms)": "2.08",
"executions per sec": "480.72",
"executed times": "25",
"sample mean (secs)": "0.00",
"sample deviation": "1.45e-4"
"sample deviation": "9.01e-5"
}

@@ -44,55 +44,55 @@ ],

"test name": "1000 add randomly",
"time taken (ms)": "12.85",
"executions per sec": "77.83",
"time taken (ms)": "12.88",
"executions per sec": "77.65",
"executed times": "5",
"sample mean (secs)": "0.01",
"sample deviation": "1.07e-4"
"sample deviation": "1.17e-4"
},
{
"test name": "1000 add & delete randomly",
"time taken (ms)": "15.97",
"executions per sec": "62.63",
"time taken (ms)": "15.95",
"executions per sec": "62.70",
"executed times": "4",
"sample mean (secs)": "0.02",
"sample deviation": "3.07e-4"
"sample deviation": "1.78e-4"
},
{
"test name": "1000 addMany",
"time taken (ms)": "10.64",
"executions per sec": "94.01",
"time taken (ms)": "10.61",
"executions per sec": "94.25",
"executed times": "5",
"sample mean (secs)": "0.01",
"sample deviation": "2.06e-4"
"sample deviation": "1.16e-4"
},
{
"test name": "1000 get",
"time taken (ms)": "18.05",
"executions per sec": "55.39",
"time taken (ms)": "18.02",
"executions per sec": "55.51",
"executed times": "3",
"sample mean (secs)": "0.02",
"sample deviation": "2.29e-4"
"sample deviation": "1.59e-4"
},
{
"test name": "1000 dfs",
"time taken (ms)": "68.91",
"executions per sec": "14.51",
"time taken (ms)": "69.95",
"executions per sec": "14.30",
"executed times": "1",
"sample mean (secs)": "0.07",
"sample deviation": "5.62e-4"
"sample deviation": "6.49e-4"
},
{
"test name": "1000 bfs",
"time taken (ms)": "54.57",
"executions per sec": "18.33",
"time taken (ms)": "54.78",
"executions per sec": "18.25",
"executed times": "1",
"sample mean (secs)": "0.05",
"sample deviation": "7.02e-4"
"sample deviation": "4.98e-4"
},
{
"test name": "1000 morris",
"time taken (ms)": "37.14",
"executions per sec": "26.92",
"time taken (ms)": "37.26",
"executions per sec": "26.83",
"executed times": "2",
"sample mean (secs)": "0.04",
"sample deviation": "2.33e-4"
"sample deviation": "2.16e-4"
}

@@ -107,30 +107,30 @@ ],

"time taken (ms)": "2.02",
"executions per sec": "494.26",
"executions per sec": "496.10",
"executed times": "25",
"sample mean (secs)": "0.00",
"sample deviation": "1.40e-5"
"sample deviation": "1.56e-5"
},
{
"test name": "1000 add & delete randomly",
"time taken (ms)": "4.40",
"executions per sec": "227.23",
"time taken (ms)": "4.60",
"executions per sec": "217.31",
"executed times": "12",
"sample mean (secs)": "0.00",
"sample deviation": "4.24e-5"
"sample deviation": "4.43e-4"
},
{
"test name": "1000 addMany",
"time taken (ms)": "2.12",
"executions per sec": "472.41",
"executed times": "25",
"time taken (ms)": "2.23",
"executions per sec": "448.71",
"executed times": "24",
"sample mean (secs)": "0.00",
"sample deviation": "3.10e-5"
"sample deviation": "2.96e-4"
},
{
"test name": "1000 get",
"time taken (ms)": "2.00",
"executions per sec": "500.77",
"executed times": "26",
"time taken (ms)": "2.09",
"executions per sec": "479.52",
"executed times": "25",
"sample mean (secs)": "0.00",
"sample deviation": "2.07e-5"
"sample deviation": "1.27e-5"
}

@@ -145,14 +145,14 @@ ],

"time taken (ms)": "0.10",
"executions per sec": "1.01e+4",
"executed times": "518",
"sample mean (secs)": "9.88e-5",
"sample deviation": "1.32e-6"
"executions per sec": "9871.96",
"executed times": "501",
"sample mean (secs)": "1.01e-4",
"sample deviation": "7.32e-7"
},
{
"test name": "1000 addEdge",
"time taken (ms)": "6.33",
"executions per sec": "157.96",
"time taken (ms)": "6.48",
"executions per sec": "154.29",
"executed times": "9",
"sample mean (secs)": "0.01",
"sample deviation": "4.97e-4"
"sample deviation": "0.00"
},

@@ -163,10 +163,10 @@ {

"executions per sec": "2.17e+4",
"executed times": "1103",
"sample mean (secs)": "4.60e-5",
"sample deviation": "4.30e-7"
"executed times": "1110",
"sample mean (secs)": "4.61e-5",
"sample deviation": "3.80e-7"
},
{
"test name": "1000 getEdge",
"time taken (ms)": "24.75",
"executions per sec": "40.41",
"time taken (ms)": "24.65",
"executions per sec": "40.57",
"executed times": "3",

@@ -178,23 +178,23 @@ "sample mean (secs)": "0.02",

"test name": "tarjan",
"time taken (ms)": "227.37",
"executions per sec": "4.40",
"time taken (ms)": "208.00",
"executions per sec": "4.81",
"executed times": "1",
"sample mean (secs)": "0.23",
"sample deviation": "0.05"
"sample mean (secs)": "0.21",
"sample deviation": "0.01"
},
{
"test name": "tarjan all",
"time taken (ms)": "210.81",
"executions per sec": "4.74",
"time taken (ms)": "212.97",
"executions per sec": "4.70",
"executed times": "1",
"sample mean (secs)": "0.21",
"sample deviation": "9.28e-4"
"sample deviation": "0.00"
},
{
"test name": "topologicalSort",
"time taken (ms)": "172.00",
"executions per sec": "5.81",
"time taken (ms)": "171.49",
"executions per sec": "5.83",
"executed times": "1",
"sample mean (secs)": "0.17",
"sample deviation": "0.00"
"sample deviation": "0.01"
}

@@ -209,6 +209,6 @@ ],

"time taken (ms)": "0.34",
"executions per sec": "2920.80",
"executed times": "148",
"sample mean (secs)": "3.42e-4",
"sample deviation": "2.56e-6"
"executions per sec": "2929.81",
"executed times": "149",
"sample mean (secs)": "3.41e-4",
"sample deviation": "2.37e-6"
},

@@ -218,6 +218,6 @@ {

"time taken (ms)": "3.89",
"executions per sec": "257.21",
"executions per sec": "257.31",
"executed times": "14",
"sample mean (secs)": "0.00",
"sample deviation": "3.07e-5"
"sample deviation": "2.53e-5"
}

@@ -231,15 +231,15 @@ ],

"test name": "1000000 unshift",
"time taken (ms)": "208.88",
"executions per sec": "4.79",
"time taken (ms)": "212.40",
"executions per sec": "4.71",
"executed times": "1",
"sample mean (secs)": "0.21",
"sample deviation": "0.03"
"sample deviation": "0.02"
},
{
"test name": "1000000 unshift & shift",
"time taken (ms)": "167.74",
"executions per sec": "5.96",
"time taken (ms)": "172.94",
"executions per sec": "5.78",
"executed times": "1",
"sample mean (secs)": "0.17",
"sample deviation": "0.04"
"sample deviation": "0.03"
},

@@ -249,6 +249,6 @@ {

"time taken (ms)": "0.03",
"executions per sec": "3.76e+4",
"executed times": "1902",
"sample mean (secs)": "2.66e-5",
"sample deviation": "2.13e-7"
"executions per sec": "3.70e+4",
"executed times": "1903",
"sample mean (secs)": "2.71e-5",
"sample deviation": "2.38e-6"
}

@@ -262,15 +262,15 @@ ],

"test name": "1000 push & pop",
"time taken (ms)": "1.78",
"executions per sec": "561.53",
"time taken (ms)": "1.75",
"executions per sec": "571.73",
"executed times": "30",
"sample mean (secs)": "0.00",
"sample deviation": "1.18e-4"
"sample deviation": "5.06e-5"
},
{
"test name": "1000 insertBefore",
"time taken (ms)": "2.32",
"executions per sec": "430.74",
"time taken (ms)": "2.30",
"executions per sec": "434.82",
"executed times": "22",
"sample mean (secs)": "0.00",
"sample deviation": "7.42e-5"
"sample deviation": "5.10e-5"
}

@@ -284,7 +284,7 @@ ],

"test name": "10000 refill & poll",
"time taken (ms)": "11.30",
"executions per sec": "88.52",
"time taken (ms)": "11.41",
"executions per sec": "87.65",
"executed times": "5",
"sample mean (secs)": "0.01",
"sample deviation": "2.15e-4"
"sample deviation": "1.49e-4"
}

@@ -298,14 +298,14 @@ ],

"test name": "1000000 push",
"time taken (ms)": "219.93",
"executions per sec": "4.55",
"time taken (ms)": "212.51",
"executions per sec": "4.71",
"executed times": "1",
"sample mean (secs)": "0.22",
"sample deviation": "0.05"
"sample mean (secs)": "0.21",
"sample deviation": "0.06"
},
{
"test name": "1000000 shift",
"time taken (ms)": "26.22",
"executions per sec": "38.14",
"time taken (ms)": "24.98",
"executions per sec": "40.04",
"executed times": "3",
"sample mean (secs)": "0.03",
"sample mean (secs)": "0.02",
"sample deviation": "0.00"

@@ -320,4 +320,4 @@ }

"test name": "1000000 push",
"time taken (ms)": "44.03",
"executions per sec": "22.71",
"time taken (ms)": "41.97",
"executions per sec": "23.83",
"executed times": "2",

@@ -329,4 +329,4 @@ "sample mean (secs)": "0.04",

"test name": "1000000 push & shift",
"time taken (ms)": "79.14",
"executions per sec": "12.64",
"time taken (ms)": "79.08",
"executions per sec": "12.65",
"executed times": "1",

@@ -343,14 +343,14 @@ "sample mean (secs)": "0.08",

"test name": "100000 push",
"time taken (ms)": "54.61",
"executions per sec": "18.31",
"time taken (ms)": "54.24",
"executions per sec": "18.44",
"executed times": "1",
"sample mean (secs)": "0.05",
"sample deviation": "0.00"
"sample deviation": "7.00e-4"
},
{
"test name": "100000 getWords",
"time taken (ms)": "93.45",
"executions per sec": "10.70",
"time taken (ms)": "96.12",
"executions per sec": "10.40",
"executed times": "1",
"sample mean (secs)": "0.09",
"sample mean (secs)": "0.10",
"sample deviation": "0.00"

@@ -357,0 +357,0 @@ }

@@ -11,3 +11,3 @@ # Changelog

## [v1.41.6](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
## [v1.41.7](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)

@@ -14,0 +14,0 @@ ### Changes

@@ -175,3 +175,3 @@ "use strict";

const dfs = (cur, dest, visiting, path) => {
visiting.set(cur, true);
visiting.add(cur);
if (cur === dest) {

@@ -182,11 +182,11 @@ paths.push([vertex1, ...path]);

for (const neighbor of neighbors) {
if (!visiting.get(neighbor)) {
if (!visiting.has(neighbor)) {
path.push(neighbor);
dfs(neighbor, dest, visiting, path);
(0, utils_1.arrayRemove)(path, (vertex) => vertex === neighbor);
path.pop();
}
}
visiting.set(cur, false);
visiting.delete(cur);
};
dfs(vertex1, vertex2, new Map(), []);
dfs(vertex1, vertex2, new Set(), []);
return paths;

@@ -193,0 +193,0 @@ }

@@ -178,3 +178,3 @@ "use strict";

const dfs = (cur, dest, visiting, path) => {
visiting.set(cur, true);
visiting.add(cur);
if (cur === dest) {

@@ -185,11 +185,11 @@ paths.push([vertex1, ...path]);

for (const neighbor of neighbors) {
if (!visiting.get(neighbor)) {
if (!visiting.has(neighbor)) {
path.push(neighbor);
dfs(neighbor, dest, visiting, path);
(0, utils_1.arrayRemove)(path, (vertex) => vertex === neighbor);
path.pop();
}
}
visiting.set(cur, false);
visiting.delete(cur);
};
dfs(vertex1, vertex2, new Map(), []);
dfs(vertex1, vertex2, new Set(), []);
return paths;

@@ -196,0 +196,0 @@ }

{
"name": "data-structure-typed",
"version": "1.41.6",
"version": "1.41.7",
"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.",

@@ -67,6 +67,6 @@ "main": "dist/cjs/src/index.js",

"auto-changelog": "^2.4.0",
"avl-tree-typed": "^1.41.2",
"avl-tree-typed": "^1.41.6",
"benchmark": "^2.1.4",
"binary-tree-typed": "^1.41.2",
"bst-typed": "^1.41.2",
"binary-tree-typed": "^1.41.6",
"bst-typed": "^1.41.6",
"dependency-cruiser": "^14.1.0",

@@ -79,3 +79,3 @@ "eslint": "^8.50.0",

"fast-glob": "^3.3.1",
"heap-typed": "^1.41.2",
"heap-typed": "^1.41.6",
"istanbul-badges-readme": "^1.8.5",

@@ -82,0 +82,0 @@ "jest": "^29.7.0",

@@ -661,35 +661,35 @@ # Data Structure Typed

<div class='collapsible level0' ><span class='json-to-html-label'>avl-tree</span></div>
<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.23</td><td>448.62</td><td>23</td><td>0.00</td><td>5.02e-5</td></tr><tr><td>1000 add & delete randomly</td><td>5.04</td><td>198.31</td><td>11</td><td>0.01</td><td>1.30e-4</td></tr><tr><td>1000 addMany</td><td>3.11</td><td>321.43</td><td>17</td><td>0.00</td><td>3.26e-5</td></tr><tr><td>1000 get</td><td>2.03</td><td>493.26</td><td>26</td><td>0.00</td><td>1.45e-4</td></tr></table></div>
<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.28</td><td>438.38</td><td>23</td><td>0.00</td><td>2.56e-5</td></tr><tr><td>1000 add & delete randomly</td><td>5.16</td><td>193.94</td><td>11</td><td>0.01</td><td>7.96e-4</td></tr><tr><td>1000 addMany</td><td>3.05</td><td>328.30</td><td>17</td><td>0.00</td><td>3.13e-4</td></tr><tr><td>1000 get</td><td>2.08</td><td>480.72</td><td>25</td><td>0.00</td><td>9.01e-5</td></tr></table></div>
</div><div class="json-to-html-collapse clearfix 0">
<div class='collapsible level0' ><span class='json-to-html-label'>binary-tree</span></div>
<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>12.85</td><td>77.83</td><td>5</td><td>0.01</td><td>1.07e-4</td></tr><tr><td>1000 add & delete randomly</td><td>15.97</td><td>62.63</td><td>4</td><td>0.02</td><td>3.07e-4</td></tr><tr><td>1000 addMany</td><td>10.64</td><td>94.01</td><td>5</td><td>0.01</td><td>2.06e-4</td></tr><tr><td>1000 get</td><td>18.05</td><td>55.39</td><td>3</td><td>0.02</td><td>2.29e-4</td></tr><tr><td>1000 dfs</td><td>68.91</td><td>14.51</td><td>1</td><td>0.07</td><td>5.62e-4</td></tr><tr><td>1000 bfs</td><td>54.57</td><td>18.33</td><td>1</td><td>0.05</td><td>7.02e-4</td></tr><tr><td>1000 morris</td><td>37.14</td><td>26.92</td><td>2</td><td>0.04</td><td>2.33e-4</td></tr></table></div>
<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>12.88</td><td>77.65</td><td>5</td><td>0.01</td><td>1.17e-4</td></tr><tr><td>1000 add & delete randomly</td><td>15.95</td><td>62.70</td><td>4</td><td>0.02</td><td>1.78e-4</td></tr><tr><td>1000 addMany</td><td>10.61</td><td>94.25</td><td>5</td><td>0.01</td><td>1.16e-4</td></tr><tr><td>1000 get</td><td>18.02</td><td>55.51</td><td>3</td><td>0.02</td><td>1.59e-4</td></tr><tr><td>1000 dfs</td><td>69.95</td><td>14.30</td><td>1</td><td>0.07</td><td>6.49e-4</td></tr><tr><td>1000 bfs</td><td>54.78</td><td>18.25</td><td>1</td><td>0.05</td><td>4.98e-4</td></tr><tr><td>1000 morris</td><td>37.26</td><td>26.83</td><td>2</td><td>0.04</td><td>2.16e-4</td></tr></table></div>
</div><div class="json-to-html-collapse clearfix 0">
<div class='collapsible level0' ><span class='json-to-html-label'>bst</span></div>
<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.02</td><td>494.26</td><td>25</td><td>0.00</td><td>1.40e-5</td></tr><tr><td>1000 add & delete randomly</td><td>4.40</td><td>227.23</td><td>12</td><td>0.00</td><td>4.24e-5</td></tr><tr><td>1000 addMany</td><td>2.12</td><td>472.41</td><td>25</td><td>0.00</td><td>3.10e-5</td></tr><tr><td>1000 get</td><td>2.00</td><td>500.77</td><td>26</td><td>0.00</td><td>2.07e-5</td></tr></table></div>
<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.02</td><td>496.10</td><td>25</td><td>0.00</td><td>1.56e-5</td></tr><tr><td>1000 add & delete randomly</td><td>4.60</td><td>217.31</td><td>12</td><td>0.00</td><td>4.43e-4</td></tr><tr><td>1000 addMany</td><td>2.23</td><td>448.71</td><td>24</td><td>0.00</td><td>2.96e-4</td></tr><tr><td>1000 get</td><td>2.09</td><td>479.52</td><td>25</td><td>0.00</td><td>1.27e-5</td></tr></table></div>
</div><div class="json-to-html-collapse clearfix 0">
<div class='collapsible level0' ><span class='json-to-html-label'>directed-graph</span></div>
<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>1.01e+4</td><td>518</td><td>9.88e-5</td><td>1.32e-6</td></tr><tr><td>1000 addEdge</td><td>6.33</td><td>157.96</td><td>9</td><td>0.01</td><td>4.97e-4</td></tr><tr><td>1000 getVertex</td><td>0.05</td><td>2.17e+4</td><td>1103</td><td>4.60e-5</td><td>4.30e-7</td></tr><tr><td>1000 getEdge</td><td>24.75</td><td>40.41</td><td>3</td><td>0.02</td><td>0.01</td></tr><tr><td>tarjan</td><td>227.37</td><td>4.40</td><td>1</td><td>0.23</td><td>0.05</td></tr><tr><td>tarjan all</td><td>210.81</td><td>4.74</td><td>1</td><td>0.21</td><td>9.28e-4</td></tr><tr><td>topologicalSort</td><td>172.00</td><td>5.81</td><td>1</td><td>0.17</td><td>0.00</td></tr></table></div>
<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>9871.96</td><td>501</td><td>1.01e-4</td><td>7.32e-7</td></tr><tr><td>1000 addEdge</td><td>6.48</td><td>154.29</td><td>9</td><td>0.01</td><td>0.00</td></tr><tr><td>1000 getVertex</td><td>0.05</td><td>2.17e+4</td><td>1110</td><td>4.61e-5</td><td>3.80e-7</td></tr><tr><td>1000 getEdge</td><td>24.65</td><td>40.57</td><td>3</td><td>0.02</td><td>0.01</td></tr><tr><td>tarjan</td><td>208.00</td><td>4.81</td><td>1</td><td>0.21</td><td>0.01</td></tr><tr><td>tarjan all</td><td>212.97</td><td>4.70</td><td>1</td><td>0.21</td><td>0.00</td></tr><tr><td>topologicalSort</td><td>171.49</td><td>5.83</td><td>1</td><td>0.17</td><td>0.01</td></tr></table></div>
</div><div class="json-to-html-collapse clearfix 0">
<div class='collapsible level0' ><span class='json-to-html-label'>heap</span></div>
<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>2920.80</td><td>148</td><td>3.42e-4</td><td>2.56e-6</td></tr><tr><td>1000 fib add & pop</td><td>3.89</td><td>257.21</td><td>14</td><td>0.00</td><td>3.07e-5</td></tr></table></div>
<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>2929.81</td><td>149</td><td>3.41e-4</td><td>2.37e-6</td></tr><tr><td>1000 fib add & pop</td><td>3.89</td><td>257.31</td><td>14</td><td>0.00</td><td>2.53e-5</td></tr></table></div>
</div><div class="json-to-html-collapse clearfix 0">
<div class='collapsible level0' ><span class='json-to-html-label'>doubly-linked-list</span></div>
<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>208.88</td><td>4.79</td><td>1</td><td>0.21</td><td>0.03</td></tr><tr><td>1000000 unshift & shift</td><td>167.74</td><td>5.96</td><td>1</td><td>0.17</td><td>0.04</td></tr><tr><td>1000 insertBefore</td><td>0.03</td><td>3.76e+4</td><td>1902</td><td>2.66e-5</td><td>2.13e-7</td></tr></table></div>
<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>212.40</td><td>4.71</td><td>1</td><td>0.21</td><td>0.02</td></tr><tr><td>1000000 unshift & shift</td><td>172.94</td><td>5.78</td><td>1</td><td>0.17</td><td>0.03</td></tr><tr><td>1000 insertBefore</td><td>0.03</td><td>3.70e+4</td><td>1903</td><td>2.71e-5</td><td>2.38e-6</td></tr></table></div>
</div><div class="json-to-html-collapse clearfix 0">
<div class='collapsible level0' ><span class='json-to-html-label'>singly-linked-list</span></div>
<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.78</td><td>561.53</td><td>30</td><td>0.00</td><td>1.18e-4</td></tr><tr><td>1000 insertBefore</td><td>2.32</td><td>430.74</td><td>22</td><td>0.00</td><td>7.42e-5</td></tr></table></div>
<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.75</td><td>571.73</td><td>30</td><td>0.00</td><td>5.06e-5</td></tr><tr><td>1000 insertBefore</td><td>2.30</td><td>434.82</td><td>22</td><td>0.00</td><td>5.10e-5</td></tr></table></div>
</div><div class="json-to-html-collapse clearfix 0">
<div class='collapsible level0' ><span class='json-to-html-label'>max-priority-queue</span></div>
<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.30</td><td>88.52</td><td>5</td><td>0.01</td><td>2.15e-4</td></tr></table></div>
<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.41</td><td>87.65</td><td>5</td><td>0.01</td><td>1.49e-4</td></tr></table></div>
</div><div class="json-to-html-collapse clearfix 0">
<div class='collapsible level0' ><span class='json-to-html-label'>deque</span></div>
<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>219.93</td><td>4.55</td><td>1</td><td>0.22</td><td>0.05</td></tr><tr><td>1000000 shift</td><td>26.22</td><td>38.14</td><td>3</td><td>0.03</td><td>0.00</td></tr></table></div>
<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>212.51</td><td>4.71</td><td>1</td><td>0.21</td><td>0.06</td></tr><tr><td>1000000 shift</td><td>24.98</td><td>40.04</td><td>3</td><td>0.02</td><td>0.00</td></tr></table></div>
</div><div class="json-to-html-collapse clearfix 0">
<div class='collapsible level0' ><span class='json-to-html-label'>queue</span></div>
<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>44.03</td><td>22.71</td><td>2</td><td>0.04</td><td>0.01</td></tr><tr><td>1000000 push & shift</td><td>79.14</td><td>12.64</td><td>1</td><td>0.08</td><td>0.00</td></tr></table></div>
<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>41.97</td><td>23.83</td><td>2</td><td>0.04</td><td>0.01</td></tr><tr><td>1000000 push & shift</td><td>79.08</td><td>12.65</td><td>1</td><td>0.08</td><td>0.00</td></tr></table></div>
</div><div class="json-to-html-collapse clearfix 0">
<div class='collapsible level0' ><span class='json-to-html-label'>trie</span></div>
<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.61</td><td>18.31</td><td>1</td><td>0.05</td><td>0.00</td></tr><tr><td>100000 getWords</td><td>93.45</td><td>10.70</td><td>1</td><td>0.09</td><td>0.00</td></tr></table></div>
<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.24</td><td>18.44</td><td>1</td><td>0.05</td><td>7.00e-4</td></tr><tr><td>100000 getWords</td><td>96.12</td><td>10.40</td><td>1</td><td>0.10</td><td>0.00</td></tr></table></div>
</div>
[//]: # (End of Replace Section)

@@ -236,4 +236,4 @@ /**

const dfs = (cur: VO, dest: VO, visiting: Map<VO, boolean>, path: VO[]) => {
visiting.set(cur, true);
const dfs = (cur: VO, dest: VO, visiting: Set<VO>, path: VO[]) => {
visiting.add(cur);

@@ -246,13 +246,13 @@ if (cur === dest) {

for (const neighbor of neighbors) {
if (!visiting.get(neighbor)) {
if (!visiting.has(neighbor)) {
path.push(neighbor);
dfs(neighbor, dest, visiting, path);
arrayRemove(path, (vertex: VO) => vertex === neighbor);
path.pop();
}
}
visiting.set(cur, false);
visiting.delete(cur);
};
dfs(vertex1, vertex2, new Map<VO, boolean>(), []);
dfs(vertex1, vertex2, new Set<VO>(), []);
return paths;

@@ -259,0 +259,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc