Data Structure Typed
Data Structures of Javascript & TypeScript.
Do you envy C++ with STL, Python with collections, and Java with java.util ? Well, no need to envy anymore! JavaScript and TypeScript now have data-structure-typed.
Now you can use this library in Node.js and browser environments in CommonJS(require export.modules = ), ESModule(import export), Typescript(import export), UMD(var Queue = dataStructureTyped.Queue)
Built-in classic algorithms
DFS(Depth-First Search), DFSIterative, BFS(Breadth-First Search), morris, Bellman-Ford Algorithm, Dijkstra's Algorithm,
Floyd-Warshall Algorithm, Tarjan's Algorithm.
Installation and Usage
npm
npm i data-structure-typed --save
yarn
yarn add data-structure-typed
import {
BinaryTree, Graph, Queue, Stack, PriorityQueue, BST, Trie, DoublyLinkedList,
AVLTree, MinHeap, SinglyLinkedList, DirectedGraph, TreeMultiset,
DirectedVertex, AVLTreeNode
} from 'data-structure-typed';
CDN
<script src='https://cdn.jsdelivr.net/npm/data-structure-typed/dist/umd/data-structure-typed.min.js'></script>
const {Heap} = dataStructureTyped;
const {
BinaryTree, Graph, Queue, Stack, PriorityQueue, BST, Trie, DoublyLinkedList,
AVLTree, MinHeap, SinglyLinkedList, DirectedGraph, TreeMultiset,
DirectedVertex, AVLTreeNode
} = dataStructureTyped;
API docs & Examples
API Docs
Live Examples
Examples Repository
Code Snippet
Binary Search Tree (BST) snippet
TS
import {BST, BSTNode} from 'data-structure-typed';
const bst = new BST();
bst.add(11);
bst.add(3);
bst.addMany([15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]);
bst.size === 16; // true
bst.has(6); // true
const node6 = bst.get(6); // BSTNode
bst.getHeight(6) === 2; // true
bst.getHeight() === 5; // true
bst.getDepth(6) === 3; // true
bst.getLeftMost()?.id === 1; // true
bst.delete(6);
bst.get(6); // null
bst.isAVLBalanced(); // true
bst.bfs()[0] === 11; // true
const objBST = new BST<BSTNode<{id: number, keyA: number}>>();
objBST.add(11, {id: 11, keyA: 11});
objBST.add(3, {id: 3, keyA: 3});
objBST.addMany([{id: 15, keyA: 15}, {id: 1, keyA: 1}, {id: 8, keyA: 8},
{id: 13, keyA: 13}, {id: 16, keyA: 16}, {id: 2, keyA: 2},
{id: 6, keyA: 6}, {id: 9, keyA: 9}, {id: 12, keyA: 12},
{id: 14, keyA: 14}, {id: 4, keyA: 4}, {id: 7, keyA: 7},
{id: 10, keyA: 10}, {id: 5, keyA: 5}]);
objBST.delete(11);
JS
const {BST, BSTNode} = require('data-structure-typed');
const bst = new BST();
bst.add(11);
bst.add(3);
bst.addMany([15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]);
bst.size === 16; // true
bst.has(6); // true
const node6 = bst.get(6);
bst.getHeight(6) === 2; // true
bst.getHeight() === 5; // true
bst.getDepth(6) === 3; // true
const leftMost = bst.getLeftMost();
leftMost?.id === 1; // true
expect(leftMost?.id).toBe(1);
bst.delete(6);
bst.get(6); // null
bst.isAVLBalanced(); // true or false
const bfsIDs = bst.bfs();
bfsIDs[0] === 11; // true
expect(bfsIDs[0]).toBe(11);
const objBST = new BST();
objBST.add(11, {id: 11, keyA: 11});
objBST.add(3, {id: 3, keyA: 3});
objBST.addMany([{id: 15, keyA: 15}, {id: 1, keyA: 1}, {id: 8, keyA: 8},
{id: 13, keyA: 13}, {id: 16, keyA: 16}, {id: 2, keyA: 2},
{id: 6, keyA: 6}, {id: 9, keyA: 9}, {id: 12, keyA: 12},
{id: 14, keyA: 14}, {id: 4, keyA: 4}, {id: 7, keyA: 7},
{id: 10, keyA: 10}, {id: 5, keyA: 5}]);
objBST.delete(11);
const avlTree = new AVLTree();
avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5])
avlTree.isAVLBalanced(); // true
avlTree.delete(10);
avlTree.isAVLBalanced(); // true
AVLTree snippet
TS
import {AVLTree} from 'data-structure-typed';
const avlTree = new AVLTree();
avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5])
avlTree.isAVLBalanced(); // true
avlTree.delete(10);
avlTree.isAVLBalanced(); // true
JS
const {AVLTree} = require('data-structure-typed');
const avlTree = new AVLTree();
avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5])
avlTree.isAVLBalanced(); // true
avlTree.delete(10);
avlTree.isAVLBalanced(); // true
Directed Graph simple snippet
TS or JS
import {DirectedGraph} from 'data-structure-typed';
const graph = new DirectedGraph();
graph.addVertex('A');
graph.addVertex('B');
graph.hasVertex('A'); // true
graph.hasVertex('B'); // true
graph.hasVertex('C'); // false
graph.addEdge('A', 'B');
graph.hasEdge('A', 'B'); // true
graph.hasEdge('B', 'A'); // false
graph.deleteEdgeSrcToDest('A', 'B');
graph.hasEdge('A', 'B'); // false
graph.addVertex('C');
graph.addEdge('A', 'B');
graph.addEdge('B', 'C');
const topologicalOrderIds = graph.topologicalSort(); // ['A', 'B', 'C']
Undirected Graph snippet
TS or JS
import {UndirectedGraph} from 'data-structure-typed';
const graph = new UndirectedGraph();
graph.addVertex('A');
graph.addVertex('B');
graph.addVertex('C');
graph.addVertex('D');
graph.deleteVertex('C');
graph.addEdge('A', 'B');
graph.addEdge('B', 'D');
const dijkstraResult = graph.dijkstra('A');
Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D']
Data Structures
Standard library data structure comparison
Data Structure |
Data Structure Typed |
C++ STL |
java.util |
Python collections |
Dynamic Array |
Array<E> |
vector<T> |
ArrayList<E> |
list |
Linked List |
DoublyLinkedList<E> |
list<T> |
LinkedList<E> |
deque |
Singly Linked List |
SinglyLinkedList<E> |
- |
- |
- |
Set |
Set<E> |
set<T> |
HashSet<E> |
set |
Map |
Map<K, V> |
map<K, V> |
HashMap<K, V> |
dict |
Ordered Dictionary |
Map<K, V> |
- |
- |
OrderedDict |
Queue |
Queue<E> |
queue<T> |
Queue<E> |
- |
Priority Queue |
PriorityQueue<E> |
priority_queue<T> |
PriorityQueue<E> |
- |
Heap |
Heap<V> |
priority_queue<T> |
PriorityQueue<E> |
heapq |
Stack |
Stack<E> |
stack<T> |
Stack<E> |
- |
Deque |
Deque<E> |
deque<T> |
- |
- |
Trie |
Trie |
- |
- |
- |
Unordered Map |
HashMap<K, V> |
unordered_map<K, V> |
HashMap<K, V> |
defaultdict |
Multiset |
- |
multiset<T> |
- |
- |
Multimap |
- |
multimap<K, V> |
- |
- |
Binary Tree |
BinaryTree<K, V> |
- |
- |
- |
Binary Search Tree |
BST<K, V> |
- |
- |
- |
Directed Graph |
DirectedGraph<V, E> |
- |
- |
- |
Undirected Graph |
UndirectedGraph<V, E> |
- |
- |
- |
Unordered Multiset |
- |
unordered_multiset |
- |
Counter |
Linked Hash Set |
- |
- |
LinkedHashSet<E> |
- |
Linked Hash Map |
- |
- |
LinkedHashMap<K, V> |
- |
Sorted Set |
AVLTree<E> |
- |
TreeSet<E> |
- |
Sorted Map |
AVLTree<K, V> |
- |
TreeMap<K, V> |
- |
Tree Set |
AVLTree<E> |
set |
TreeSet<E> |
- |
Unordered Multimap |
- |
unordered_multimap<K, V> |
- |
- |
Bitset |
- |
bitset<N> |
- |
- |
Unordered Set |
- |
unordered_set<T> |
HashSet<E> |
- |
Code design
Adhere to ES6 standard naming conventions for APIs.
Standardize API conventions by using 'add' and 'delete' for element manipulation methods in all data structures.
Opt for concise and clear method names, avoiding excessive length while ensuring explicit intent.
Object-oriented programming(OOP)
By strictly adhering to object-oriented design (BinaryTree -> BST -> AVLTree -> TreeMultiset), you can seamlessly
inherit the existing data structures to implement the customized ones you need. Object-oriented design stands as the
optimal approach to data structure design.
Benchmark
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.22 | 449.77 | 23 | 0.00 | 2.65e-5 |
1000 add & delete randomly | 11.58 | 86.37 | 5 | 0.01 | 5.00e-4 |
1000 addMany | 3.10 | 322.62 | 17 | 0.00 | 1.23e-4 |
1000 get | 24.91 | 40.14 | 3 | 0.02 | 7.25e-4 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 13.05 | 76.62 | 5 | 0.01 | 3.58e-4 |
1000 add & delete randomly | 15.76 | 63.44 | 4 | 0.02 | 1.24e-4 |
1000 addMany | 10.67 | 93.68 | 5 | 0.01 | 6.84e-4 |
1000 get | 23.72 | 42.15 | 3 | 0.02 | 2.74e-4 |
1000 dfs | 72.32 | 13.83 | 1 | 0.07 | 7.21e-4 |
1000 bfs | 54.98 | 18.19 | 1 | 0.05 | 6.62e-4 |
1000 morris | 37.33 | 26.79 | 2 | 0.04 | 3.72e-4 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.34 | 427.09 | 22 | 0.00 | 2.19e-5 |
1000 add & delete randomly | 13.21 | 75.70 | 4 | 0.01 | 3.61e-4 |
1000 addMany | 2.23 | 449.06 | 24 | 0.00 | 4.38e-5 |
1000 get | 25.81 | 38.75 | 2 | 0.03 | 6.13e-4 |
directed-graph
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 addVertex | 0.10 | 9761.68 | 498 | 1.02e-4 | 1.73e-6 |
1000 addEdge | 6.40 | 156.27 | 9 | 0.01 | 5.45e-4 |
1000 getVertex | 0.05 | 2.17e+4 | 1094 | 4.61e-5 | 2.85e-7 |
1000 getEdge | 22.10 | 45.25 | 3 | 0.02 | 0.00 |
tarjan | 209.19 | 4.78 | 1 | 0.21 | 0.01 |
tarjan all | 211.22 | 4.73 | 1 | 0.21 | 0.00 |
topologicalSort | 170.38 | 5.87 | 1 | 0.17 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add & pop | 0.34 | 2921.82 | 149 | 3.42e-4 | 3.19e-6 |
1000 fib add & pop | 3.93 | 254.62 | 14 | 0.00 | 7.82e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 unshift | 218.29 | 4.58 | 1 | 0.22 | 0.07 |
1000000 unshift & shift | 168.88 | 5.92 | 1 | 0.17 | 0.03 |
1000 insertBefore | 0.03 | 3.72e+4 | 1904 | 2.69e-5 | 4.13e-7 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 push & pop | 1.77 | 564.34 | 30 | 0.00 | 5.91e-5 |
1000 insertBefore | 2.31 | 432.88 | 22 | 0.00 | 5.53e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
10000 refill & poll | 11.42 | 87.54 | 5 | 0.01 | 1.63e-4 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 223.27 | 4.48 | 1 | 0.22 | 0.03 |
1000000 shift | 24.66 | 40.55 | 3 | 0.02 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 43.10 | 23.20 | 2 | 0.04 | 0.01 |
1000000 push & shift | 79.89 | 12.52 | 1 | 0.08 | 0.00 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
100000 push | 54.81 | 18.24 | 1 | 0.05 | 0.00 |
100000 getWords | 94.93 | 10.53 | 1 | 0.09 | 0.01 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.18 | 458.66 | 24 | 0.00 | 2.36e-5 |
1000 add & delete randomly | 11.07 | 90.33 | 5 | 0.01 | 1.53e-4 |
1000 addMany | 2.89 | 346.20 | 18 | 0.00 | 2.52e-5 |
1000 get | 24.19 | 41.34 | 3 | 0.02 | 1.67e-4 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 12.88 | 77.65 | 4 | 0.01 | 3.26e-4 |
1000 add & delete randomly | 15.71 | 63.65 | 4 | 0.02 | 1.42e-4 |
1000 addMany | 10.64 | 94.02 | 5 | 0.01 | 1.79e-4 |
1000 get | 24.06 | 41.56 | 3 | 0.02 | 3.48e-4 |
1000 dfs | 72.21 | 13.85 | 1 | 0.07 | 0.00 |
1000 bfs | 54.74 | 18.27 | 1 | 0.05 | 4.33e-4 |
1000 morris | 37.26 | 26.84 | 2 | 0.04 | 0.00 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.16 | 462.35 | 24 | 0.00 | 1.86e-5 |
1000 add & delete randomly | 13.54 | 73.87 | 5 | 0.01 | 3.91e-4 |
1000 addMany | 2.12 | 472.08 | 25 | 0.00 | 2.86e-5 |
1000 get | 25.26 | 39.60 | 3 | 0.03 | 1.83e-4 |
directed-graph
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 addVertex | 0.10 | 9972.07 | 509 | 1.00e-4 | 1.01e-6 |
1000 addEdge | 6.12 | 163.35 | 9 | 0.01 | 4.88e-4 |
1000 getVertex | 0.05 | 2.17e+4 | 1099 | 4.60e-5 | 4.25e-7 |
1000 getEdge | 23.20 | 43.11 | 3 | 0.02 | 0.00 |
tarjan | 211.96 | 4.72 | 1 | 0.21 | 0.01 |
tarjan all | 214.88 | 4.65 | 1 | 0.21 | 0.00 |
topologicalSort | 173.46 | 5.76 | 1 | 0.17 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add & pop | 0.34 | 2922.29 | 149 | 3.42e-4 | 2.94e-6 |
1000 fib add & pop | 3.90 | 256.37 | 14 | 0.00 | 4.30e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 unshift | 209.62 | 4.77 | 1 | 0.21 | 0.05 |
1000000 unshift & shift | 171.61 | 5.83 | 1 | 0.17 | 0.04 |
1000 insertBefore | 0.03 | 3.19e+4 | 1908 | 3.13e-5 | 4.47e-5 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 push & pop | 1.75 | 571.57 | 30 | 0.00 | 2.44e-5 |
1000 insertBefore | 2.31 | 433.19 | 23 | 0.00 | 5.11e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
10000 refill & poll | 11.33 | 88.30 | 5 | 0.01 | 1.41e-4 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 195.14 | 5.12 | 1 | 0.20 | 0.04 |
1000000 shift | 26.24 | 38.10 | 3 | 0.03 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 44.30 | 22.57 | 2 | 0.04 | 0.01 |
1000000 push & shift | 79.54 | 12.57 | 1 | 0.08 | 0.00 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
100000 push | 56.00 | 17.86 | 1 | 0.06 | 0.00 |
100000 getWords | 101.66 | 9.84 | 1 | 0.10 | 0.01 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.17 | 460.58 | 24 | 0.00 | 2.54e-5 |
1000 add & delete randomly | 11.23 | 89.05 | 5 | 0.01 | 1.99e-4 |
1000 addMany | 2.87 | 348.16 | 18 | 0.00 | 3.30e-5 |
1000 get | 24.53 | 40.77 | 3 | 0.02 | 2.11e-4 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 13.39 | 74.69 | 5 | 0.01 | 9.80e-4 |
1000 add & delete randomly | 16.28 | 61.44 | 4 | 0.02 | 9.38e-4 |
1000 addMany | 10.94 | 91.44 | 5 | 0.01 | 5.48e-4 |
1000 get | 24.35 | 41.06 | 3 | 0.02 | 0.00 |
1000 dfs | 74.51 | 13.42 | 1 | 0.07 | 0.00 |
1000 bfs | 56.95 | 17.56 | 1 | 0.06 | 0.00 |
1000 morris | 38.59 | 25.91 | 2 | 0.04 | 0.00 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.03 | 493.40 | 26 | 0.00 | 6.59e-5 |
1000 add & delete randomly | 12.87 | 77.70 | 5 | 0.01 | 5.53e-4 |
1000 addMany | 2.14 | 466.33 | 25 | 0.00 | 1.21e-4 |
1000 get | 25.93 | 38.56 | 2 | 0.03 | 9.04e-4 |
directed-graph
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 addVertex | 0.11 | 9341.59 | 487 | 1.07e-4 | 4.65e-6 |
1000 addEdge | 0.01 | 1.53e+5 | 8459 | 6.55e-6 | 8.65e-7 |
1000 getVertex | 5.06e-5 | 1.98e+7 | 1e+6 | 5.06e-8 | 2.36e-9 |
1000 getEdge | 0.02 | 4.40e+4 | 2356 | 2.27e-5 | 1.22e-6 |
1000 tarjan [needArticulationPoints] | 204.76 | 4.88 | 1 | 0.20 | 0.01 |
1000 tarjan all | 204.67 | 4.89 | 1 | 0.20 | 0.00 |
1000 topologicalSort | 168.38 | 5.94 | 1 | 0.17 | 0.01 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add & pop | 0.34 | 2913.64 | 149 | 3.43e-4 | 5.05e-6 |
1000 fib add & pop | 3.93 | 254.43 | 13 | 0.00 | 5.15e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 unshift | 227.99 | 4.39 | 1 | 0.23 | 0.07 |
1000000 unshift & shift | 176.47 | 5.67 | 1 | 0.18 | 0.03 |
1000 insertBefore | 0.03 | 3.72e+4 | 1906 | 2.69e-5 | 3.49e-7 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 push & pop | 1.78 | 562.61 | 30 | 0.00 | 6.55e-5 |
1000 insertBefore | 2.35 | 425.30 | 22 | 0.00 | 8.54e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
10000 refill & poll | 11.73 | 85.28 | 5 | 0.01 | 7.65e-4 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 227.87 | 4.39 | 1 | 0.23 | 0.07 |
1000000 shift | 25.08 | 39.88 | 3 | 0.03 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 43.10 | 23.20 | 2 | 0.04 | 0.01 |
1000000 push & shift | 88.41 | 11.31 | 1 | 0.09 | 0.04 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
100000 push | 50.41 | 19.84 | 2 | 0.05 | 0.00 |
100000 getWords | 103.01 | 9.71 | 1 | 0.10 | 0.01 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.28 | 437.87 | 23 | 0.00 | 1.95e-4 |
1000 add & delete randomly | 11.16 | 89.62 | 5 | 0.01 | 1.41e-4 |
1000 addMany | 3.00 | 333.18 | 17 | 0.00 | 2.62e-5 |
1000 get | 24.27 | 41.20 | 3 | 0.02 | 1.60e-4 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 12.94 | 77.28 | 5 | 0.01 | 2.22e-4 |
1000 add & delete randomly | 15.85 | 63.11 | 4 | 0.02 | 2.55e-4 |
1000 addMany | 10.64 | 93.95 | 5 | 0.01 | 3.08e-4 |
1000 get | 23.67 | 42.24 | 3 | 0.02 | 1.79e-4 |
1000 dfs | 72.14 | 13.86 | 1 | 0.07 | 5.13e-4 |
1000 bfs | 54.74 | 18.27 | 1 | 0.05 | 4.80e-4 |
1000 morris | 37.04 | 27.00 | 2 | 0.04 | 2.48e-4 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.09 | 477.97 | 25 | 0.00 | 1.43e-5 |
1000 add & delete randomly | 12.92 | 77.42 | 4 | 0.01 | 2.78e-4 |
1000 addMany | 2.20 | 454.39 | 24 | 0.00 | 3.52e-5 |
1000 get | 25.18 | 39.71 | 3 | 0.03 | 1.71e-4 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add & pop | 0.34 | 2914.73 | 149 | 3.43e-4 | 8.46e-6 |
1000 fib add & pop | 3.92 | 254.88 | 14 | 0.00 | 6.46e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 unshift | 194.96 | 5.13 | 1 | 0.19 | 0.04 |
1000000 unshift & shift | 154.70 | 6.46 | 1 | 0.15 | 0.02 |
1000 insertBefore | 0.03 | 3.71e+4 | 1921 | 2.70e-5 | 6.61e-7 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 push & pop | 1.77 | 565.65 | 30 | 0.00 | 4.37e-5 |
1000 insertBefore | 2.32 | 431.45 | 22 | 0.00 | 4.01e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
10000 refill & poll | 11.67 | 85.67 | 5 | 0.01 | 3.92e-4 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 212.30 | 4.71 | 1 | 0.21 | 0.04 |
1000000 shift | 25.17 | 39.73 | 3 | 0.03 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 44.65 | 22.39 | 2 | 0.04 | 0.01 |
1000000 push & shift | 80.66 | 12.40 | 1 | 0.08 | 0.00 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
100000 push | 64.81 | 15.43 | 1 | 0.06 | 0.01 |
100000 getWords | 126.97 | 7.88 | 1 | 0.13 | 0.02 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.10 | 475.11 | 25 | 0.00 | 2.06e-5 |
1000 add & delete randomly | 11.14 | 89.78 | 5 | 0.01 | 2.22e-4 |
1000 addMany | 2.89 | 346.01 | 18 | 0.00 | 7.29e-5 |
1000 get | 24.35 | 41.07 | 3 | 0.02 | 1.56e-4 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 12.80 | 78.11 | 5 | 0.01 | 7.83e-5 |
1000 add & delete randomly | 15.63 | 63.97 | 4 | 0.02 | 9.29e-5 |
1000 addMany | 10.58 | 94.53 | 5 | 0.01 | 1.21e-4 |
1000 get | 23.63 | 42.31 | 3 | 0.02 | 1.97e-4 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.31 | 433.05 | 22 | 0.00 | 5.43e-5 |
1000 add & delete randomly | 13.90 | 71.92 | 4 | 0.01 | 3.66e-4 |
1000 addMany | 2.13 | 469.94 | 25 | 0.00 | 4.34e-5 |
1000 get | 25.95 | 38.54 | 2 | 0.03 | 6.68e-4 |
1000 dfs | 73.68 | 13.57 | 1 | 0.07 | 0.00 |
1000 bfs | 59.29 | 16.87 | 1 | 0.06 | 0.01 |
1000 morris | 37.84 | 26.43 | 2 | 0.04 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add & pop | 0.34 | 2913.15 | 149 | 3.43e-4 | 2.85e-6 |
1000 fib add & pop | 3.91 | 255.50 | 14 | 0.00 | 6.06e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 unshift | 204.44 | 4.89 | 1 | 0.20 | 0.03 |
1000000 unshift & shift | 153.33 | 6.52 | 1 | 0.15 | 0.03 |
1000 insertBefore | 0.03 | 3.79e+4 | 1924 | 2.64e-5 | 3.02e-7 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 push & pop | 1.77 | 564.14 | 30 | 0.00 | 5.34e-5 |
1000 insertBefore | 2.32 | 431.40 | 22 | 0.00 | 7.10e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
10000 refill & poll | 11.34 | 88.18 | 5 | 0.01 | 1.37e-4 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 194.39 | 5.14 | 1 | 0.19 | 0.04 |
1000000 shift | 25.45 | 39.29 | 3 | 0.03 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 42.43 | 23.57 | 2 | 0.04 | 0.01 |
1000000 push & shift | 79.47 | 12.58 | 1 | 0.08 | 0.00 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
100000 push | 54.41 | 18.38 | 1 | 0.05 | 0.00 |
100000 getWords | 103.78 | 9.64 | 1 | 0.10 | 0.01 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.13 | 468.81 | 24 | 0.00 | 1.71e-5 |
1000 add & delete randomly | 11.72 | 85.36 | 5 | 0.01 | 0.00 |
1000 addMany | 2.54 | 393.52 | 20 | 0.00 | 2.31e-5 |
1000 get | 24.41 | 40.97 | 3 | 0.02 | 2.33e-4 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add | 66.25 | 15.09 | 3 | 0.07 | 0.00 |
1000 delete | 22.00 | 45.44 | 1056 | 0.02 | 0.04 |
1000 addMany | 10.95 | 91.33 | 5 | 0.01 | 0.00 |
1000 get | 33.95 | 29.45 | 2 | 0.03 | 0.00 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.13 | 468.52 | 25 | 0.00 | 1.38e-4 |
1000 delete randomly | 0.05 | 1.97e+4 | 1042 | 5.08e-5 | 2.42e-6 |
1000 addMany balanced | 2.66 | 375.97 | 20 | 0.00 | 1.42e-4 |
1000 get | 57.25 | 17.47 | 1 | 0.06 | 0.01 |
1000 dfs | 176.13 | 5.68 | 1 | 0.18 | 0.01 |
1000 bfs | 139.29 | 7.18 | 1 | 0.14 | 0.01 |
1000 morris | 95.23 | 10.50 | 1 | 0.10 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add & pop | 0.34 | 2906.83 | 148 | 3.44e-4 | 4.91e-6 |
1000 fib add & pop | 3.94 | 253.80 | 14 | 0.00 | 8.47e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 unshift | 192.84 | 5.19 | 1 | 0.19 | 0.04 |
1000000 unshift & shift | 172.25 | 5.81 | 1 | 0.17 | 0.06 |
1000 insertBefore | 0.03 | 3.57e+4 | 1893 | 2.80e-5 | 1.34e-6 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 push & pop | 1.81 | 553.05 | 30 | 0.00 | 1.26e-4 |
1000 insertBefore | 2.33 | 428.33 | 22 | 0.00 | 5.84e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
10000 refill & poll | 11.64 | 85.89 | 5 | 0.01 | 4.05e-4 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 187.65 | 5.33 | 1 | 0.19 | 0.03 |
1000000 shift | 25.48 | 39.24 | 3 | 0.03 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 44.51 | 22.47 | 2 | 0.04 | 0.01 |
1000000 push & shift | 81.12 | 12.33 | 1 | 0.08 | 0.00 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
100000 push | 65.19 | 15.34 | 2 | 0.07 | 0.01 |
100000 getWords | 117.42 | 8.52 | 1 | 0.12 | 0.02 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.21 | 453.16 | 23 | 0.00 | 2.00e-5 |
1000 add & delete randomly | 10.96 | 91.27 | 5 | 0.01 | 1.89e-4 |
1000 addMany | 2.61 | 383.69 | 20 | 0.00 | 7.84e-5 |
1000 get | 25.13 | 39.79 | 3 | 0.03 | 7.48e-4 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add | 67.50 | 14.82 | 3 | 0.07 | 0.00 |
1000 delete | 23.92 | 41.80 | 1048 | 0.02 | 0.04 |
1000 addMany | 10.82 | 92.42 | 5 | 0.01 | 6.56e-4 |
1000 get | 33.23 | 30.10 | 2 | 0.03 | 4.01e-4 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 1.96 | 511.38 | 27 | 0.00 | 3.28e-5 |
1000 delete randomly | 0.05 | 2.00e+4 | 1049 | 5.01e-5 | 5.38e-6 |
1000 addMany balanced | 2.66 | 375.73 | 20 | 0.00 | 1.64e-4 |
1000 get | 54.31 | 18.41 | 1 | 0.05 | 0.00 |
1000 dfs | 168.17 | 5.95 | 1 | 0.17 | 0.00 |
1000 bfs | 147.47 | 6.78 | 1 | 0.15 | 0.02 |
1000 morris | 104.11 | 9.60 | 1 | 0.10 | 0.01 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add & pop | 0.35 | 2832.05 | 149 | 3.53e-4 | 5.74e-5 |
1000 fib add & pop | 4.02 | 248.85 | 14 | 0.00 | 5.56e-4 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 unshift | 211.23 | 4.73 | 1 | 0.21 | 0.03 |
1000000 unshift & shift | 180.12 | 5.55 | 1 | 0.18 | 0.04 |
1000 insertBefore | 0.03 | 3.40e+4 | 1833 | 2.94e-5 | 4.38e-6 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 push & pop | 1.82 | 550.20 | 30 | 0.00 | 1.53e-4 |
1000 insertBefore | 2.37 | 421.75 | 22 | 0.00 | 2.85e-4 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
10000 refill & poll | 11.98 | 83.44 | 5 | 0.01 | 0.00 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 217.79 | 4.59 | 1 | 0.22 | 0.02 |
1000000 shift | 27.98 | 35.74 | 3 | 0.03 | 0.01 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 44.72 | 22.36 | 2 | 0.04 | 0.01 |
1000000 push & shift | 78.64 | 12.72 | 1 | 0.08 | 0.00 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
100000 push | 59.24 | 16.88 | 1 | 0.06 | 0.01 |
100000 getWords | 110.04 | 9.09 | 1 | 0.11 | 0.01 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.60 | 384.09 | 20 | 0.00 | 2.17e-5 |
1000 add & delete randomly | 11.50 | 86.96 | 5 | 0.01 | 1.09e-4 |
1000 addMany | 2.96 | 337.68 | 18 | 0.00 | 2.41e-5 |
1000 get | 24.33 | 41.10 | 3 | 0.02 | 1.87e-4 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add | 66.65 | 15.00 | 3 | 0.07 | 0.00 |
1000 delete | 22.94 | 43.59 | 1048 | 0.02 | 0.04 |
1000 addMany | 10.46 | 95.59 | 5 | 0.01 | 1.06e-4 |
1000 get | 33.16 | 30.15 | 2 | 0.03 | 3.69e-4 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.57 | 388.55 | 20 | 0.00 | 2.56e-5 |
1000 delete randomly | 0.05 | 2.05e+4 | 1077 | 4.87e-5 | 8.43e-7 |
1000 addMany balanced | 3.08 | 324.33 | 17 | 0.00 | 3.01e-5 |
1000 get | 54.02 | 18.51 | 1 | 0.05 | 0.00 |
1000 dfs | 169.21 | 5.91 | 1 | 0.17 | 0.00 |
1000 bfs | 136.05 | 7.35 | 1 | 0.14 | 0.00 |
1000 morris | 90.60 | 11.04 | 1 | 0.09 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add & pop | 0.34 | 2924.08 | 149 | 3.42e-4 | 3.76e-6 |
1000 fib add & pop | 3.88 | 258.00 | 14 | 0.00 | 4.57e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 unshift | 200.13 | 5.00 | 1 | 0.20 | 0.04 |
1000000 unshift & shift | 151.88 | 6.58 | 1 | 0.15 | 0.02 |
1000 insertBefore | 0.03 | 3.78e+4 | 1921 | 2.65e-5 | 4.68e-7 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 push & pop | 1.77 | 565.88 | 30 | 0.00 | 4.84e-5 |
1000 insertBefore | 2.32 | 431.01 | 23 | 0.00 | 7.27e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
10000 refill & poll | 11.39 | 87.80 | 5 | 0.01 | 1.70e-4 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 197.16 | 5.07 | 1 | 0.20 | 0.03 |
1000000 shift | 25.30 | 39.52 | 3 | 0.03 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 43.59 | 22.94 | 2 | 0.04 | 0.01 |
1000000 push & shift | 79.42 | 12.59 | 1 | 0.08 | 0.00 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
100000 push | 54.98 | 18.19 | 1 | 0.05 | 0.00 |
100000 getWords | 122.28 | 8.18 | 1 | 0.12 | 0.01 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.27 | 440.05 | 23 | 0.00 | 8.11e-5 |
1000 delete randomly | 0.05 | 1.85e+4 | 948 | 5.40e-5 | 6.80e-7 |
1000 addMany | 2.99 | 334.92 | 18 | 0.00 | 3.05e-5 |
1000 get | 53.09 | 18.84 | 1 | 0.05 | 9.51e-4 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add | 67.11 | 14.90 | 3 | 0.07 | 0.00 |
1000 delete | 22.14 | 45.16 | 1071 | 0.02 | 0.04 |
1000 addMany | 8.95 | 111.75 | 6 | 0.01 | 2.26e-4 |
1000 get | 31.51 | 31.73 | 2 | 0.03 | 3.98e-4 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add randomly | 2.68 | 373.07 | 24 | 0.00 | 0.00 |
1000 delete randomly | 0.05 | 1.96e+4 | 1056 | 5.11e-5 | 3.03e-6 |
1000 addMany balanced | 2.68 | 373.77 | 20 | 0.00 | 6.55e-5 |
1000 get | 55.41 | 18.05 | 1 | 0.06 | 0.00 |
1000 dfs | 176.11 | 5.68 | 1 | 0.18 | 0.00 |
1000 bfs | 140.03 | 7.14 | 1 | 0.14 | 0.00 |
1000 morris | 102.45 | 9.76 | 1 | 0.10 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 add & pop | 0.34 | 2916.00 | 150 | 3.43e-4 | 1.26e-5 |
1000 fib add & pop | 4.62 | 216.38 | 14 | 0.00 | 0.00 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 unshift | 197.23 | 5.07 | 1 | 0.20 | 0.03 |
1000000 unshift & shift | 162.69 | 6.15 | 1 | 0.16 | 0.03 |
1000 insertBefore | 0.03 | 3.63e+4 | 1907 | 2.76e-5 | 7.08e-7 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000 push & pop | 1.82 | 549.57 | 30 | 0.00 | 1.65e-4 |
1000 insertBefore | 2.33 | 430.03 | 22 | 0.00 | 5.59e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
10000 refill & poll | 11.40 | 87.71 | 5 | 0.01 | 1.55e-4 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 194.90 | 5.13 | 1 | 0.19 | 0.04 |
1000000 shift | 24.83 | 40.27 | 3 | 0.02 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
1000000 push | 41.71 | 23.97 | 2 | 0.04 | 0.00 |
1000000 push & shift | 78.72 | 12.70 | 1 | 0.08 | 0.00 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
100000 push | 53.88 | 18.56 | 1 | 0.05 | 9.89e-4 |
100000 getWords | 98.82 | 10.12 | 1 | 0.10 | 0.00 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.10 | 475.20 | 25 | 0.00 | 2.33e-5 |
delete 1000 randomly | 0.05 | 1.87e+4 | 947 | 5.35e-5 | 3.85e-7 |
addMany 1000 | 2.89 | 345.59 | 18 | 0.00 | 2.62e-5 |
get 1000 | 52.02 | 19.22 | 2 | 0.05 | 9.28e-4 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 | 66.58 | 15.02 | 3 | 0.07 | 0.01 |
delete 1000 | 25.34 | 39.46 | 849 | 0.03 | 0.04 |
addMany 1000 | 8.78 | 113.85 | 6 | 0.01 | 9.87e-5 |
get 1000 | 31.27 | 31.98 | 2 | 0.03 | 2.82e-4 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.15 | 465.12 | 24 | 0.00 | 1.88e-5 |
delete 1000 randomly | 0.05 | 2.08e+4 | 1091 | 4.80e-5 | 5.57e-7 |
addMany 1000 balanced | 2.51 | 397.88 | 21 | 0.00 | 3.54e-5 |
get 1000 | 56.57 | 17.68 | 1 | 0.06 | 0.00 |
dfs 1000 | 170.58 | 5.86 | 1 | 0.17 | 0.00 |
bfs 1000 | 139.69 | 7.16 | 1 | 0.14 | 0.00 |
morris 1000 | 97.36 | 10.27 | 1 | 0.10 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add & 1000 | 0.34 | 2923.16 | 149 | 3.42e-4 | 4.01e-6 |
fib add & pop 1000 | 3.88 | 257.61 | 14 | 0.00 | 4.95e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
unshift 1000000 | 193.54 | 5.17 | 1 | 0.19 | 0.03 |
unshift & shift 1000000 | 164.74 | 6.07 | 1 | 0.16 | 0.03 |
insertBefore 1000 | 0.03 | 3.72e+4 | 1908 | 2.69e-5 | 7.19e-7 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push & pop 1000 | 1.77 | 565.06 | 29 | 0.00 | 8.16e-5 |
insertBefore 1000 | 2.31 | 433.08 | 22 | 0.00 | 5.99e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
refill & poll 10000 | 11.40 | 87.73 | 5 | 0.01 | 1.86e-4 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 210.40 | 4.75 | 1 | 0.21 | 0.05 |
shift 1000000 | 25.12 | 39.80 | 3 | 0.03 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 42.11 | 23.75 | 2 | 0.04 | 0.00 |
push & shift 1000000 | 78.82 | 12.69 | 1 | 0.08 | 0.00 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 100000 | 52.72 | 18.97 | 1 | 0.05 | 0.00 |
getWords 100000 | 98.36 | 10.17 | 1 | 0.10 | 0.00 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.07 | 482.88 | 25 | 0.00 | 2.62e-5 |
delete 1000 randomly | 0.06 | 1.73e+4 | 922 | 5.77e-5 | 5.23e-6 |
addMany 1000 | 2.87 | 348.56 | 18 | 0.00 | 2.76e-5 |
get 1000 | 52.08 | 19.20 | 2 | 0.05 | 0.00 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 | 67.65 | 14.78 | 3 | 0.07 | 0.00 |
delete 1000 | 23.38 | 42.78 | 1083 | 0.02 | 0.04 |
addMany 1000 | 8.81 | 113.55 | 6 | 0.01 | 8.24e-5 |
get 1000 | 32.11 | 31.15 | 2 | 0.03 | 4.49e-4 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.15 | 464.93 | 24 | 0.00 | 2.37e-4 |
delete 1000 randomly | 0.05 | 2.08e+4 | 1062 | 4.81e-5 | 5.51e-7 |
addMany 1000 balanced | 2.51 | 397.64 | 21 | 0.00 | 5.50e-5 |
get 1000 | 57.87 | 17.28 | 1 | 0.06 | 0.01 |
dfs 1000 | 168.09 | 5.95 | 1 | 0.17 | 7.76e-4 |
bfs 1000 | 143.73 | 6.96 | 1 | 0.14 | 0.00 |
morris 1000 | 96.97 | 10.31 | 1 | 0.10 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add & 1000 | 0.34 | 2927.21 | 149 | 3.42e-4 | 3.55e-6 |
fib add & pop 1000 | 3.91 | 255.44 | 14 | 0.00 | 1.98e-4 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
unshift 1000000 | 196.83 | 5.08 | 1 | 0.20 | 0.02 |
unshift & shift 1000000 | 152.50 | 6.56 | 1 | 0.15 | 0.02 |
insertBefore 1000 | 0.03 | 3.78e+4 | 1922 | 2.65e-5 | 2.96e-7 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push & pop 1000 | 1.76 | 569.49 | 29 | 0.00 | 5.19e-5 |
insertBefore 1000 | 2.30 | 435.27 | 22 | 0.00 | 4.67e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
refill & poll 1000000 | 1880.37 | 0.53 | 1 | 1.88 | 0.06 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 210.28 | 4.76 | 1 | 0.21 | 0.03 |
shift 1000000 | 24.42 | 40.94 | 3 | 0.02 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 41.74 | 23.96 | 2 | 0.04 | 0.00 |
push & shift 1000000 | 81.48 | 12.27 | 1 | 0.08 | 0.01 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 100000 | 57.44 | 17.41 | 1 | 0.06 | 0.00 |
getWords 100000 | 129.57 | 7.72 | 1 | 0.13 | 0.01 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.09 | 477.46 | 25 | 0.00 | 2.54e-5 |
delete 1000 randomly | 0.06 | 1.78e+4 | 919 | 5.61e-5 | 1.46e-6 |
addMany 1000 | 2.96 | 337.92 | 18 | 0.00 | 7.78e-5 |
get 1000 | 54.25 | 18.43 | 1 | 0.05 | 0.00 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 | 67.80 | 14.75 | 3 | 0.07 | 0.00 |
delete 1000 | 22.79 | 43.88 | 1094 | 0.02 | 0.04 |
addMany 1000 | 8.83 | 113.24 | 6 | 0.01 | 1.42e-4 |
get 1000 | 30.52 | 32.76 | 2 | 0.03 | 0.00 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.18 | 459.02 | 24 | 0.00 | 7.16e-5 |
delete 1000 randomly | 0.05 | 2.06e+4 | 1083 | 4.85e-5 | 1.15e-6 |
addMany 1000 balanced | 2.53 | 394.85 | 21 | 0.00 | 6.11e-5 |
get 1000 | 56.51 | 17.70 | 1 | 0.06 | 0.00 |
dfs 1000 | 173.68 | 5.76 | 1 | 0.17 | 0.00 |
bfs 1000 | 156.93 | 6.37 | 1 | 0.16 | 0.04 |
morris 1000 | 96.71 | 10.34 | 1 | 0.10 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add & 1000 | 0.35 | 2876.02 | 149 | 3.48e-4 | 4.35e-5 |
fib add & pop 1000 | 4.09 | 244.66 | 14 | 0.00 | 5.12e-4 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
unshift 1000000 | 210.78 | 4.74 | 1 | 0.21 | 0.05 |
unshift & shift 1000000 | 161.09 | 6.21 | 1 | 0.16 | 0.03 |
insertBefore 1000 | 0.03 | 3.73e+4 | 1923 | 2.68e-5 | 8.43e-7 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push & pop 1000 | 1.85 | 539.24 | 30 | 0.00 | 2.91e-4 |
insertBefore 1000 | 2.35 | 424.68 | 22 | 0.00 | 2.11e-4 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
refill & poll 1000000 | 1804.27 | 0.55 | 1 | 1.80 | 0.02 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 221.64 | 4.51 | 1 | 0.22 | 0.02 |
shift 1000000 | 25.77 | 38.80 | 3 | 0.03 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 42.25 | 23.67 | 2 | 0.04 | 0.01 |
push & shift 1000000 | 79.53 | 12.57 | 1 | 0.08 | 0.00 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 100000 | 54.33 | 18.41 | 1 | 0.05 | 0.00 |
getWords 100000 | 96.38 | 10.38 | 1 | 0.10 | 0.01 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.14 | 468.25 | 24 | 0.00 | 5.65e-5 |
delete 1000 randomly | 0.06 | 1.79e+4 | 921 | 5.59e-5 | 2.02e-6 |
addMany 1000 | 2.91 | 344.07 | 18 | 0.00 | 6.78e-5 |
get 1000 | 51.87 | 19.28 | 2 | 0.05 | 0.00 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 | 68.32 | 14.64 | 3 | 0.07 | 0.01 |
delete 1000 | 23.84 | 41.95 | 1064 | 0.02 | 0.04 |
addMany 1000 | 8.88 | 112.68 | 6 | 0.01 | 1.46e-4 |
get 1000 | 31.50 | 31.74 | 2 | 0.03 | 3.96e-4 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.00 | 500.66 | 26 | 0.00 | 7.44e-5 |
delete 1000 randomly | 0.05 | 2.03e+4 | 1054 | 4.94e-5 | 1.86e-6 |
addMany 1000 balanced | 2.51 | 397.65 | 21 | 0.00 | 4.80e-5 |
get 1000 | 56.09 | 17.83 | 1 | 0.06 | 0.00 |
dfs 1000 | 174.02 | 5.75 | 1 | 0.17 | 0.00 |
bfs 1000 | 141.06 | 7.09 | 1 | 0.14 | 0.00 |
morris 1000 | 92.36 | 10.83 | 1 | 0.09 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add & 1000 | 0.34 | 2917.16 | 149 | 3.43e-4 | 5.21e-6 |
fib add & pop 1000 | 3.89 | 256.80 | 14 | 0.00 | 9.36e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
unshift 1000000 | 190.62 | 5.25 | 1 | 0.19 | 0.03 |
unshift & shift 1000000 | 168.36 | 5.94 | 1 | 0.17 | 0.03 |
insertBefore 1000 | 0.03 | 3.37e+4 | 1883 | 2.97e-5 | 6.52e-6 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push & pop 1000 | 1.85 | 541.77 | 30 | 0.00 | 3.02e-4 |
insertBefore 1000 | 2.32 | 431.07 | 22 | 0.00 | 5.25e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
refill & poll 1000000 | 1913.83 | 0.52 | 1 | 1.91 | 0.10 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 216.62 | 4.62 | 1 | 0.22 | 0.01 |
shift 1000000 | 27.11 | 36.88 | 3 | 0.03 | 0.01 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 42.14 | 23.73 | 2 | 0.04 | 0.00 |
push & shift 1000000 | 78.64 | 12.72 | 1 | 0.08 | 0.00 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000 | 0.49 | 2026.34 | 152 | 4.94e-4 | 6.50e-5 |
getWords 1000 | 0.82 | 1221.37 | 69 | 8.19e-4 | 2.39e-4 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.12 | 471.67 | 25 | 0.00 | 5.01e-5 |
delete 1000 randomly | 0.06 | 1.81e+4 | 931 | 5.53e-5 | 7.08e-7 |
addMany 1000 | 2.87 | 348.35 | 18 | 0.00 | 3.58e-5 |
get 1000 | 53.76 | 18.60 | 1 | 0.05 | 0.00 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 | 66.89 | 14.95 | 3 | 0.07 | 0.01 |
delete 1000 | 28.05 | 35.65 | 1092 | 0.03 | 0.04 |
addMany 1000 | 9.09 | 110.01 | 6 | 0.01 | 4.39e-4 |
get 1000 | 30.55 | 32.73 | 2 | 0.03 | 0.00 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.03 | 493.66 | 26 | 0.00 | 3.35e-4 |
delete 1000 randomly | 0.05 | 2.20e+4 | 1116 | 4.55e-5 | 5.93e-7 |
addMany 1000 balanced | 2.65 | 378.00 | 20 | 0.00 | 9.59e-5 |
get 1000 | 67.90 | 14.73 | 1 | 0.07 | 0.02 |
dfs 1000 | 172.24 | 5.81 | 1 | 0.17 | 0.00 |
bfs 1000 | 141.51 | 7.07 | 1 | 0.14 | 0.00 |
morris 1000 | 95.27 | 10.50 | 1 | 0.10 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add & 1000 | 0.34 | 2921.08 | 149 | 3.42e-4 | 3.52e-6 |
fib add & pop 1000 | 3.94 | 253.57 | 14 | 0.00 | 9.42e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
unshift 1000000 | 204.77 | 4.88 | 1 | 0.20 | 0.03 |
unshift & shift 1000000 | 164.80 | 6.07 | 1 | 0.16 | 0.02 |
insertBefore 1000 | 0.03 | 3.53e+4 | 1910 | 2.83e-5 | 5.73e-6 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push & pop 1000 | 1.77 | 564.06 | 30 | 0.00 | 4.03e-5 |
insertBefore 1000 | 2.33 | 428.74 | 22 | 0.00 | 5.85e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
refill & poll 1000000 | 1911.53 | 0.52 | 1 | 1.91 | 0.04 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 220.69 | 4.53 | 1 | 0.22 | 0.04 |
shift 1000000 | 25.02 | 39.96 | 3 | 0.03 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 42.43 | 23.57 | 2 | 0.04 | 0.01 |
push & shift 1000000 | 80.16 | 12.48 | 1 | 0.08 | 0.00 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 535.25 | 1.87 | 1 | 0.54 | 0.01 |
getWords 1000000 | 954.39 | 1.05 | 1 | 0.95 | 0.05 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.12 | 471.05 | 24 | 0.00 | 1.97e-5 |
delete 1000 randomly | 0.06 | 1.81e+4 | 924 | 5.52e-5 | 6.93e-7 |
addMany 1000 | 2.91 | 343.28 | 18 | 0.00 | 4.22e-5 |
get 1000 | 54.16 | 18.47 | 1 | 0.05 | 0.00 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 | 66.45 | 15.05 | 3 | 0.07 | 0.00 |
delete 1000 | 23.68 | 42.23 | 1105 | 0.02 | 0.04 |
addMany 1000 | 8.88 | 112.56 | 6 | 0.01 | 2.72e-4 |
get 1000 | 33.41 | 29.93 | 2 | 0.03 | 0.01 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.02 | 494.39 | 26 | 0.00 | 4.57e-5 |
delete 1000 randomly | 0.04 | 2.23e+4 | 1141 | 4.49e-5 | 7.95e-7 |
addMany 1000 balanced | 2.66 | 375.24 | 20 | 0.00 | 9.32e-5 |
get 1000 | 62.64 | 15.96 | 1 | 0.06 | 0.00 |
dfs 1000 | 171.07 | 5.85 | 1 | 0.17 | 0.00 |
bfs 1000 | 141.61 | 7.06 | 1 | 0.14 | 8.60e-4 |
morris 1000 | 96.09 | 10.41 | 1 | 0.10 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add & 1000 | 0.34 | 2921.53 | 148 | 3.42e-4 | 3.47e-6 |
fib add & pop 1000 | 3.90 | 256.59 | 14 | 0.00 | 6.06e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
unshift 1000000 | 208.24 | 4.80 | 1 | 0.21 | 0.04 |
unshift & shift 1000000 | 152.50 | 6.56 | 1 | 0.15 | 0.01 |
insertBefore 1000 | 0.03 | 3.66e+4 | 1921 | 2.73e-5 | 1.79e-6 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push & pop 1000 | 1.75 | 571.08 | 30 | 0.00 | 3.19e-5 |
insertBefore 1000 | 2.33 | 429.11 | 22 | 0.00 | 8.52e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
refill & poll 1000000 | 1854.15 | 0.54 | 1 | 1.85 | 0.05 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 212.74 | 4.70 | 1 | 0.21 | 0.02 |
shift 1000000 | 25.11 | 39.82 | 3 | 0.03 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 42.64 | 23.45 | 2 | 0.04 | 0.01 |
push & shift 1000000 | 78.50 | 12.74 | 1 | 0.08 | 7.49e-4 |
trie
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 3.17 | 315.82 | 18 | 0.00 | 3.74e-4 |
getWords 1000000 | 5.00 | 199.99 | 11 | 0.01 | 1.85e-4 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.19 | 457.50 | 24 | 0.00 | 6.07e-5 |
delete 1000 randomly | 0.06 | 1.80e+4 | 924 | 5.56e-5 | 1.04e-6 |
addMany 1000 | 3.02 | 330.95 | 17 | 0.00 | 9.53e-5 |
get 1000 | 52.92 | 18.90 | 2 | 0.05 | 0.00 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 | 65.94 | 15.17 | 3 | 0.07 | 0.00 |
delete 1000 | 31.56 | 31.68 | 1098 | 0.03 | 0.04 |
addMany 1000 | 8.94 | 111.81 | 6 | 0.01 | 3.04e-4 |
get 1000 | 31.51 | 31.73 | 2 | 0.03 | 2.99e-4 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.45 | 408.29 | 21 | 0.00 | 2.76e-5 |
delete 1000 randomly | 0.05 | 2.22e+4 | 1132 | 4.51e-5 | 6.97e-7 |
addMany 1000 balanced | 2.74 | 364.65 | 20 | 0.00 | 8.78e-5 |
get 1000 | 61.54 | 16.25 | 1 | 0.06 | 0.00 |
dfs 1000 | 172.43 | 5.80 | 1 | 0.17 | 0.00 |
bfs 1000 | 140.76 | 7.10 | 1 | 0.14 | 0.00 |
morris 1000 | 93.57 | 10.69 | 1 | 0.09 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add & 1000 | 0.34 | 2933.08 | 149 | 3.41e-4 | 2.82e-6 |
fib add & pop 1000 | 3.89 | 257.27 | 14 | 0.00 | 3.17e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
unshift 1000000 | 192.82 | 5.19 | 1 | 0.19 | 0.04 |
unshift & shift 1000000 | 156.37 | 6.40 | 1 | 0.16 | 0.03 |
insertBefore 1000 | 0.03 | 3.70e+4 | 1896 | 2.70e-5 | 3.66e-7 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push & pop 1000 | 1.79 | 559.70 | 30 | 0.00 | 2.97e-4 |
insertBefore 1000 | 2.32 | 430.90 | 22 | 0.00 | 6.01e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
refill & poll 1000000 | 1874.70 | 0.53 | 1 | 1.87 | 0.04 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 209.65 | 4.77 | 1 | 0.21 | 0.03 |
shift 1000000 | 25.54 | 39.15 | 3 | 0.03 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 42.43 | 23.57 | 2 | 0.04 | 0.01 |
push & shift 1000000 | 79.60 | 12.56 | 1 | 0.08 | 0.00 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.08 | 479.69 | 25 | 0.00 | 2.14e-5 |
delete 1000 randomly | 0.05 | 1.82e+4 | 924 | 5.49e-5 | 4.16e-7 |
addMany 1000 | 2.88 | 347.21 | 18 | 0.00 | 2.69e-5 |
get 1000 | 52.72 | 18.97 | 1 | 0.05 | 0.00 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 | 65.05 | 15.37 | 3 | 0.07 | 0.00 |
delete 1000 | 26.26 | 38.08 | 1104 | 0.03 | 0.04 |
addMany 1000 | 8.81 | 113.44 | 6 | 0.01 | 9.78e-5 |
get 1000 | 31.44 | 31.80 | 2 | 0.03 | 3.59e-4 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.04 | 490.04 | 25 | 0.00 | 2.37e-5 |
delete 1000 randomly | 0.04 | 2.23e+4 | 1137 | 4.48e-5 | 6.04e-7 |
addMany 1000 balanced | 2.67 | 375.13 | 20 | 0.00 | 2.64e-4 |
get 1000 | 62.25 | 16.06 | 1 | 0.06 | 0.00 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add & 1000 | 0.34 | 2919.71 | 149 | 3.43e-4 | 4.56e-6 |
fib add & pop 1000 | 3.88 | 257.61 | 14 | 0.00 | 4.79e-5 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
unshift 1000000 | 202.43 | 4.94 | 1 | 0.20 | 0.02 |
unshift & shift 1000000 | 158.09 | 6.33 | 1 | 0.16 | 0.03 |
insertBefore 1000 | 0.03 | 3.75e+4 | 1922 | 2.67e-5 | 4.57e-7 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push & pop 1000 | 1.77 | 564.48 | 30 | 0.00 | 7.71e-5 |
insertBefore 1000 | 2.29 | 435.77 | 22 | 0.00 | 3.74e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
refill & poll 1000000 | 1812.54 | 0.55 | 1 | 1.81 | 0.02 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 205.83 | 4.86 | 1 | 0.21 | 0.03 |
shift 1000000 | 24.78 | 40.35 | 3 | 0.02 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 42.29 | 23.65 | 2 | 0.04 | 0.01 |
push & shift 1000000 | 78.34 | 12.77 | 1 | 0.08 | 0.00 |
avl-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.39 | 418.91 | 22 | 0.00 | 6.47e-5 |
delete 1000 randomly | 0.06 | 1.77e+4 | 917 | 5.66e-5 | 1.90e-6 |
addMany 1000 | 3.32 | 301.33 | 17 | 0.00 | 5.90e-4 |
get 1000 | 55.03 | 18.17 | 1 | 0.06 | 0.00 |
binary-tree
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 | 66.49 | 15.04 | 3 | 0.07 | 0.00 |
delete 1000 | 24.04 | 41.60 | 1106 | 0.02 | 0.04 |
addMany 1000 | 9.05 | 110.44 | 6 | 0.01 | 2.88e-4 |
get 1000 | 32.12 | 31.13 | 2 | 0.03 | 6.75e-4 |
bst
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add 1000 randomly | 2.27 | 440.62 | 23 | 0.00 | 1.42e-4 |
delete 1000 randomly | 0.05 | 2.19e+4 | 1174 | 4.57e-5 | 1.97e-6 |
addMany 1000 balanced | 2.93 | 341.38 | 19 | 0.00 | 1.13e-4 |
get 1000 | 62.85 | 15.91 | 1 | 0.06 | 0.01 |
heap
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
add & 1000 | 0.35 | 2878.39 | 149 | 3.47e-4 | 1.93e-5 |
fib add & pop 1000 | 3.98 | 251.35 | 14 | 0.00 | 1.32e-4 |
doubly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
unshift 1000000 | 193.19 | 5.18 | 1 | 0.19 | 0.04 |
unshift & shift 1000000 | 170.35 | 5.87 | 1 | 0.17 | 0.03 |
insertBefore 1000 | 0.03 | 3.43e+4 | 1888 | 2.91e-5 | 6.03e-6 |
singly-linked-list
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push & pop 1000 | 1.79 | 560.08 | 29 | 0.00 | 7.70e-5 |
insertBefore 1000 | 2.31 | 433.45 | 22 | 0.00 | 5.52e-5 |
max-priority-queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
refill & poll 1000000 | 1859.40 | 0.54 | 1 | 1.86 | 0.03 |
deque
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 215.00 | 4.65 | 1 | 0.22 | 0.01 |
shift 1000000 | 25.04 | 39.94 | 3 | 0.03 | 0.00 |
queue
test name | time taken (ms) | executions per sec | executed times | sample mean (secs) | sample deviation |
---|
push 1000000 | 41.81 | 23.92 | 2 | 0.04 | 0.00 |
push & shift 1000000 | 79.17 | 12.63 | 1 | 0.08 | 8.70e-4 |