data-structure-typed 1.48.7 → 1.48.8

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 CHANGED
@@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file.
8
8
  - [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
9
9
  - [`auto-changelog`](https://github.com/CookPete/auto-changelog)
10
10
 
11
- ## [v1.48.7](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
11
+ ## [v1.48.8](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
12
12
 
13
13
  ### Changes
14
14
 
package/README.md CHANGED
@@ -17,86 +17,77 @@ Do you envy C++ with [STL]() (std::), Python with [collections](), and Java with
17
17
  anymore! JavaScript and TypeScript now have [data-structure-typed]().**`Benchmark`** compared with C++ STL. **`API standards`** aligned with ES6 and Java. **`Usability`** is comparable to Python
18
18
 
19
19
 
20
+ [//]: # (![Branches](https://img.shields.io/badge/branches-55.47%25-red.svg?style=flat))
21
+
22
+ [//]: # (![Statements](https://img.shields.io/badge/statements-67%25-red.svg?style=flat))
23
+
24
+ [//]: # (![Functions](https://img.shields.io/badge/functions-66.38%25-red.svg?style=flat))
25
+
26
+ [//]: # (![Lines](https://img.shields.io/badge/lines-68.6%25-red.svg?style=flat))
20
27
 
21
28
  ### We provide data structures that are not available in JS/TS
22
29
 
23
30
  Heap, Binary Tree, RedBlack Tree, Linked List, Deque, Trie, Directed Graph, Undirected Graph, BST, AVL Tree, Priority Queue, Queue, Tree Multiset, Linked List.
24
31
 
25
32
 
26
- ### Performance superior to native JS/TS
33
+ ### Performance surpasses that of native JS/TS
34
+
27
35
 
28
- **`Queue vs. native Array, 100,000 scale`**
29
36
  <table style="display: table; width:100%; table-layout: fixed;">
30
37
  <thead>
31
38
  <tr>
32
- <th>Test Methods</th>
39
+ <th>Method</th>
33
40
  <th>Time Taken (ms)</th>
41
+ <th>Scale</th>
42
+ <th>Belongs To</th>
34
43
  </tr>
35
44
  </thead>
36
45
  <tbody>
37
46
  <tr>
38
- <td>Queue push &amp; shift</td>
47
+ <td>Queue.push &amp; shift</td>
39
48
  <td>5.83</td>
49
+ <td>100,000</td>
50
+ <td>data-structure-typed</td>
40
51
  </tr>
41
52
  <tr>
42
- <td>Array push &amp; shift</td>
53
+ <td>Array.push &amp; shift</td>
43
54
  <td>2829.59</td>
55
+ <td>100,000</td>
56
+ <td>Native JS</td>
44
57
  </tr>
45
- </tbody>
46
- </table>
47
-
48
- **`Deque vs. native Array, 100,000 scale`**
49
- <table style="display: table; width:100%; table-layout: fixed;">
50
- <thead>
51
- <tr>
52
- <th>Test Methods</th>
53
- <th>Time Taken (ms)</th>
54
- </tr>
55
- </thead>
56
- <tbody>
57
58
  <tr>
58
- <td>Deque unshift &amp; shift</td>
59
+ <td>Deque.unshift &amp; shift</td>
59
60
  <td>2.44</td>
61
+ <td>100,000</td>
62
+ <td>data-structure-typed</td>
60
63
  </tr>
61
64
  <tr>
62
- <td>Array unshift &amp; shift</td>
65
+ <td>Array.unshift &amp; shift</td>
63
66
  <td>4750.37</td>
67
+ <td>100,000</td>
68
+ <td>Native JS</td>
69
+ </tr>
70
+ <tr>
71
+ <td>HashMap.set</td>
72
+ <td>122.51</td>
73
+ <td>1,000,000</td>
74
+ <td>data-structure-typed</td>
75
+ </tr>
76
+ <tr>
77
+ <td>Map.set</td>
78
+ <td>223.80</td>
79
+ <td>1,000,000</td>
80
+ <td>Native JS</td>
81
+ </tr>
82
+ <tr>
83
+ <td>Set.add</td>
84
+ <td>185.06</td>
85
+ <td>1,000,000</td>
86
+ <td>Native JS</td>
64
87
  </tr>
65
88
  </tbody>
66
89
  </table>
67
90
 
68
- **`HashMap vs. native Map/Set, 100,000 scale`**
69
- <table style="display: table; width:100%; table-layout: fixed;">
70
- <thead>
71
- <tr>
72
- <th>Method</th>
73
- <th>Time Taken (ms)</th>
74
- </tr>
75
- </thead>
76
- <tbody>
77
- <tr>
78
- <td>HashMap 1,000,000 set</td>
79
- <td>122.51</td>
80
- </tr>
81
- <tr>
82
- <td>Native Map 1,000,000 set</td>
83
- <td>223.80</td>
84
- </tr>
85
- <tr>
86
- <td>Native Set 1,000,000 add</td>
87
- <td>185.06</td>
88
- </tr>
89
- </tbody>
90
- </table>
91
-
92
- [//]: # (![Branches]&#40;https://img.shields.io/badge/branches-55.47%25-red.svg?style=flat&#41;)
93
-
94
- [//]: # (![Statements]&#40;https://img.shields.io/badge/statements-67%25-red.svg?style=flat&#41;)
95
-
96
- [//]: # (![Functions]&#40;https://img.shields.io/badge/functions-66.38%25-red.svg?style=flat&#41;)
97
-
98
- [//]: # (![Lines]&#40;https://img.shields.io/badge/lines-68.6%25-red.svg?style=flat&#41;)
99
-
100
91
  ## Installation and Usage
101
92
 
102
93
  Now you can use it in Node.js and browser environments
package/README_zh-CN.md CHANGED
@@ -29,71 +29,62 @@ Heap, Binary Tree, RedBlack Tree, Linked List, Deque, Trie, Directed Graph, Undi
29
29
 
30
30
  ### 性能超越原生JS/TS
31
31
 
32
- **`Queue和原生Array, 在100,000数据规模下性能对比`**
32
+
33
33
  <table style="display: table; width:100%; table-layout: fixed;">
34
34
  <thead>
35
35
  <tr>
36
- <th>Test Methods</th>
37
- <th>Time Taken (ms)</th>
36
+ <th>方法名</th>
37
+ <th>耗时(毫秒)</th>
38
+ <th>数据规模</th>
39
+ <th>所属标准库</th>
38
40
  </tr>
39
41
  </thead>
40
42
  <tbody>
41
43
  <tr>
42
- <td>Queue push &amp; shift</td>
44
+ <td>Queue.push &amp; shift</td>
43
45
  <td>5.83</td>
46
+ <td>100,000</td>
47
+ <td>data-structure-typed</td>
44
48
  </tr>
45
49
  <tr>
46
- <td>Array push &amp; shift</td>
50
+ <td>Array.push &amp; shift</td>
47
51
  <td>2829.59</td>
52
+ <td>100,000</td>
53
+ <td>原生JS</td>
48
54
  </tr>
49
- </tbody>
50
- </table>
51
-
52
- **`Deque和原生Array在100,000数据规模下的性能对比`**
53
- <table style="display: table; width:100%; table-layout: fixed;">
54
- <thead>
55
- <tr>
56
- <th>Test Methods</th>
57
- <th>Time Taken (ms)</th>
58
- </tr>
59
- </thead>
60
- <tbody>
61
55
  <tr>
62
- <td>Deque unshift &amp; shift</td>
56
+ <td>Deque.unshift &amp; shift</td>
63
57
  <td>2.44</td>
58
+ <td>100,000</td>
59
+ <td>data-structure-typed</td>
64
60
  </tr>
65
61
  <tr>
66
- <td>Array unshift &amp; shift</td>
62
+ <td>Array.unshift &amp; shift</td>
67
63
  <td>4750.37</td>
64
+ <td>100,000</td>
65
+ <td>原生JS</td>
66
+ </tr>
67
+ <tr>
68
+ <td>HashMap.set</td>
69
+ <td>122.51</td>
70
+ <td>1,000,000</td>
71
+ <td>data-structure-typed</td>
72
+ </tr>
73
+ <tr>
74
+ <td>Map.set</td>
75
+ <td>223.80</td>
76
+ <td>1,000,000</td>
77
+ <td>原生JS</td>
78
+ </tr>
79
+ <tr>
80
+ <td>Set.add</td>
81
+ <td>185.06</td>
82
+ <td>1,000,000</td>
83
+ <td>原生JS</td>
68
84
  </tr>
69
85
  </tbody>
70
86
  </table>
71
87
 
72
-
73
- **`HashMap和原生Map/Set在100,000数据规模下的性能对比`**
74
- <table style="display: table; width:100%; table-layout: fixed;">
75
- <thead>
76
- <tr>
77
- <th>Method</th>
78
- <th>Time Taken (ms)</th>
79
- </tr>
80
- </thead>
81
- <tbody>
82
- <tr>
83
- <td>HashMap 1,000,000 set</td>
84
- <td>122.51</td>
85
- </tr>
86
- <tr>
87
- <td>Native Map 1,000,000 set</td>
88
- <td>223.80</td>
89
- </tr>
90
- <tr>
91
- <td>Native Set 1,000,000 add</td>
92
- <td>185.06</td>
93
- </tr>
94
- </tbody>
95
- </table>
96
-
97
88
  [//]: # (![Branches]&#40;https://img.shields.io/badge/branches-55.47%25-red.svg?style=flat&#41;)
98
89
 
99
90
  [//]: # (![Statements]&#40;https://img.shields.io/badge/statements-67%25-red.svg?style=flat&#41;)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "data-structure-typed",
3
- "version": "1.48.7",
3
+ "version": "1.48.8",
4
4
  "description": "Data Structures of Javascript & TypeScript. Heap, Binary Tree, Red Black Tree, Linked List, Deque, Trie, HashMap, Directed Graph, Undirected Graph, Binary Search Tree(BST), AVL Tree, Priority Queue, Graph, Queue, Tree Multiset, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue, Stack. Benchmark compared with C++ STL. API aligned with ES6 and Java.util. Usability is comparable to Python",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/mjs/index.js",