From a19080bb53f0ae2cda3ab481742cbcf76891bd7a Mon Sep 17 00:00:00 2001 From: Revone Date: Sat, 30 Nov 2024 21:53:27 +1300 Subject: [PATCH] docs: playground project added --- README.md | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e189a0c..75092f0 100644 --- a/README.md +++ b/README.md @@ -829,7 +829,6 @@ macOS Big Sur Version 11.7.9 ***Our performance testing is conducted directly on the TypeScript source code. The actual performance of the compiled JavaScript code is generally 3 times higher. We have compared it with C++, and it is only 30% slower than C++.*** - Try it [on gitpod](https://gitpod.io#snapshot/93383de4-ca4c-4854-8c80-4359e681a96f) Just run @@ -844,14 +843,37 @@ pnpm perf:rbtree 1,000,000 getNode: 1.293s ``` - [//]: # (No deletion!!! Start of Replace Section)
-
avl-tree
-
test nametime taken (ms)sample mean (secs)sample deviation
100,000 add randomly526.460.530.01
100,000 add474.380.470.00
100,000 get0.727.17e-43.47e-4
100,000 getNode252.580.250.01
100,000 iterator24.840.020.00
100,000 add & delete orderly717.480.720.02
100,000 add & delete randomly898.450.900.02
+
heap
+
test nametime taken (ms)sample mean (secs)sample deviation
100,000 add6.850.013.38e-4
100,000 add & poll35.350.048.44e-4
-
red-black-tree
-
test nametime taken (ms)sample mean (secs)sample deviation
100,000 add randomly144.490.140.01
100,000 add190.530.190.00
100,000 get0.919.14e-42.11e-4
100,000 getNode323.660.320.00
100,000 node mode add randomly139.710.140.00
100,000 node mode get322.390.327.58e-4
100,000 iterator27.070.030.00
100,000 add & delete orderly349.170.350.00
100,000 add & delete randomly482.610.480.01
+
avl-tree
+
test nametime taken (ms)sample mean (secs)sample deviation
100,000 add302.890.300.01
100,000 add randomly381.830.380.00
100,000 get0.605.95e-42.33e-4
100,000 getNode150.610.150.00
100,000 iterator28.230.030.00
100,000 add & delete orderly505.570.510.01
100,000 add & delete randomly677.360.680.00
+
+
rb-tree
+
test nametime taken (ms)sample mean (secs)sample deviation
100,000 add212.770.219.84e-4
100,000 add randomly163.700.160.00
100,000 get1.190.002.44e-4
100,000 getNode347.390.350.01
100,000 node mode add randomly162.260.160.00
100,000 node mode get344.900.340.00
100,000 iterator27.480.030.00
100,000 add & delete orderly386.330.390.00
100,000 add & delete randomly520.660.520.00
+
+
doubly-linked-list
+
test nametime taken (ms)sample mean (secs)sample deviation
1,000,000 push179.280.180.02
1,000,000 unshift197.220.200.05
1,000,000 unshift & shift153.160.150.00
1,000,000 addBefore247.300.250.03
+
+
directed-graph
+
test nametime taken (ms)sample mean (secs)sample deviation
1,000 addVertex0.109.92e-51.16e-6
1,000 addEdge6.440.010.00
1,000 getVertex0.109.82e-51.13e-6
1,000 getEdge22.600.020.00
tarjan186.560.190.00
topologicalSort145.420.150.01
+
+
queue
+
test nametime taken (ms)sample mean (secs)sample deviation
1,000,000 push47.740.050.02
100,000 push & shift5.390.011.25e-4
Native JS Array 100,000 push & shift2225.502.230.10
+
+
deque
+
test nametime taken (ms)sample mean (secs)sample deviation
1,000,000 push22.880.020.01
1,000,000 push & pop27.950.030.01
1,000,000 push & shift29.830.030.01
100,000 push & shift2.710.009.03e-4
Native JS Array 100,000 push & shift2182.032.180.04
100,000 unshift & shift2.610.008.71e-4
Native JS Array 100,000 unshift & shift4185.904.190.04
+
+
hash-map
+
test nametime taken (ms)sample mean (secs)sample deviation
1,000,000 set253.450.250.07
Native JS Map 1,000,000 set228.900.230.02
Native JS Set 1,000,000 add179.650.180.01
1,000,000 set & get234.960.230.06
Native JS Map 1,000,000 set & get284.900.280.01
Native JS Set 1,000,000 add & has254.900.250.03
1,000,000 ObjKey set & get403.740.400.10
Native JS Map 1,000,000 ObjKey set & get340.180.340.07
Native JS Set 1,000,000 ObjKey add & has300.250.300.06
+
+
trie
+
test nametime taken (ms)sample mean (secs)sample deviation
100,000 push44.110.048.55e-4
100,000 getWords86.670.090.00
+
+
stack
+
test nametime taken (ms)sample mean (secs)sample deviation
1,000,000 push43.180.040.01
1,000,000 push & pop48.400.050.02
[//]: # (No deletion!!! End of Replace Section)