diff --git a/CHANGELOG.md b/CHANGELOG.md index a465c9f..81f86ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. - [Semantic Versioning](https://semver.org/spec/v2.0.0.html) - [`auto-changelog`](https://github.com/CookPete/auto-changelog) -## [v1.47.5](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming) +## [v1.47.6](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming) ### Changes diff --git a/package.json b/package.json index 7c12744..05c2ab1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-structure-typed", - "version": "1.47.5", + "version": "1.47.6", "description": "Data Structures of Javascript & TypeScript. Heap, Binary Tree, RedBlack 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.", "main": "dist/cjs/index.js", "module": "dist/mjs/index.js", diff --git a/test/performance/data-structures/comparison/comparison.test.ts b/test/performance/data-structures/comparison/comparison.test.ts index ce05cc9..988f2d1 100644 --- a/test/performance/data-structures/comparison/comparison.test.ts +++ b/test/performance/data-structures/comparison/comparison.test.ts @@ -23,17 +23,18 @@ const arrHundredThousand = getRandomIntArray(HUNDRED_THOUSAND, 0, HUNDRED_THOUSA suite .add(`SRC PQ ${TEN_THOUSAND.toLocaleString()} add`, () => { - const pq = new SRCPriorityQueue([], { comparator: (a, b) => b - a }); + const pq = new SRCPriorityQueue(); for (let i = 0; i < TEN_THOUSAND; i++) pq.add(i); }) .add(`CJS PQ ${TEN_THOUSAND.toLocaleString()} add`, () => { - const pq = new CJSPriorityQueue({ comparator: (a, b) => b - a }); + + const pq = new CJSPriorityQueue(); for (let i = 0; i < TEN_THOUSAND; i++) pq.add(i); }) .add(`MJS PQ ${TEN_THOUSAND.toLocaleString()} add`, () => { - const pq = new MJSPriorityQueue({ comparator: (a, b) => b - a }); + const pq = new MJSPriorityQueue([],{ comparator: (a, b) => b - a }); for (let i = 0; i < TEN_THOUSAND; i++) pq.add(i); }); @@ -53,13 +54,13 @@ suite for (let i = 0; i < TEN_THOUSAND; i++) pq.pop(); }) .add(`CJS PQ ${TEN_THOUSAND.toLocaleString()} add & pop`, () => { - const pq = new CJSPriorityQueue({ comparator: (a, b) => b - a }); + const pq = new CJSPriorityQueue([],{ comparator: (a, b) => b - a }); for (let i = 0; i < TEN_THOUSAND; i++) pq.add(i); for (let i = 0; i < TEN_THOUSAND; i++) pq.pop(); }) .add(`MJS PQ ${TEN_THOUSAND.toLocaleString()} add & pop`, () => { - const pq = new MJSPriorityQueue({ comparator: (a, b) => b - a }); + const pq = new MJSPriorityQueue([],{ comparator: (a, b) => b - a }); for (let i = 0; i < TEN_THOUSAND; i++) pq.add(i); for (let i = 0; i < TEN_THOUSAND; i++) pq.pop();