diff --git a/README.md b/README.md index c06a4da..e7eb12c 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,14 @@ Heap, Binary Tree, RedBlack Tree, Linked List, Deque, Trie, Directed Graph, Undi ### Performance surpasses that of native JS/TS + + @@ -45,37 +47,44 @@ Heap, Binary Tree, RedBlack Tree, Linked List, Deque, Trie, Directed Graph, Undi + - + + - + + - + + - - - + + + - - - - + + + + + - - - - + + + + + - + +
Method Time Taken (ms) ScaleBelongs To
Queue.push & shift 5.83 100,000data-structure-typed
Native Array.push & shiftArray.push & shift 2829.59 100,000Native JS
Deque.unshift & shift 2.44 100,000data-structure-typed
Native Array.unshift & shiftArray.unshift & shift 4750.37 100,000Native JS
HashMap.set 122.51
HashMap.set122.51 1,000,000
Native Map.set223.80data-structure-typed
Map.set223.80 1,000,000
Native Set.add185.06Native JS
Set.add185.06 1,000,000
Native JS
diff --git a/README_zh-CN.md b/README_zh-CN.md index b8380b7..582cbe3 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -29,12 +29,14 @@ Heap, Binary Tree, RedBlack Tree, Linked List, Deque, Trie, Directed Graph, Undi ### 性能超越原生JS/TS + - - - + + + + @@ -42,37 +44,44 @@ Heap, Binary Tree, RedBlack Tree, Linked List, Deque, Trie, Directed Graph, Undi + - + + - + + - + + - - - + + + - - - - + + + + + - - - - + + + + + - + +
MethodTime Taken (ms)Scale方法名耗时(毫秒)数据规模所属标准库
Queue.push & shift 5.83 100,000data-structure-typed
Native Array.push & shiftArray.push & shift 2829.59 100,000原生JS
Deque.unshift & shift 2.44 100,000data-structure-typed
Native Array.unshift & shiftArray.unshift & shift 4750.37 100,000原生JS
HashMap.set 122.51
HashMap.set122.51 1,000,000
Native Map.set223.80data-structure-typed
Map.set223.80 1,000,000
Native Set.add185.06原生JS
Set.add185.06 1,000,000
原生JS
diff --git a/package.json b/package.json index 4e83ab5..a8f0d67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-structure-typed", - "version": "1.48.7", + "version": "1.48.8", "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", "main": "dist/cjs/index.js", "module": "dist/mjs/index.js",