diff --git a/README.md b/README.md index cf6b329..70b3652 100644 --- a/README.md +++ b/README.md @@ -654,595 +654,41 @@ inherit the existing data structures to implement the customized ones you need. optimal approach to data structure design. ## Benchmark + +[//]: # (Start of Replace Section)
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.12470.70240.003.55e-5
1000 add & delete randomly5.12195.21110.018.78e-4
1000 addMany3.95253.32180.000.00
1000 get3.04328.49220.000.00
+
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.21451.50240.009.12e-5
1000 add & delete randomly5.02199.23110.016.31e-4
1000 addMany2.96338.41180.002.09e-4
1000 get2.00499.79260.001.89e-4
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly13.4474.3940.010.00
1000 add & delete randomly15.9362.7840.022.08e-4
1000 addMany10.7193.4150.012.11e-4
1000 get17.9055.8630.021.30e-4
1000 dfs68.5214.5910.073.98e-4
1000 bfs54.5718.3310.054.34e-4
1000 morris37.3726.7620.043.60e-4
+
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly12.9577.2350.011.82e-4
1000 add & delete randomly15.9462.7340.021.95e-4
1000 addMany10.8192.4850.015.30e-4
1000 get18.1655.0730.022.99e-4
1000 dfs69.5214.3810.070.00
1000 bfs54.8418.2410.057.36e-4
1000 morris38.2626.1320.040.00
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.15465.28240.001.79e-5
1000 add & delete randomly5.08196.92100.014.34e-5
1000 addMany2.14467.28240.004.18e-5
1000 get2.35426.21220.005.24e-5
+
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.22450.51240.006.06e-5
1000 add & delete randomly5.04198.59110.012.52e-4
1000 addMany2.14467.96250.006.00e-5
1000 get2.06486.16250.001.15e-4
directed-graph
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 addVertex0.109846.765051.02e-42.82e-6
1000 addEdge6.23160.4790.015.72e-4
1000 getVertex0.052.18e+411004.59e-53.84e-7
1000 getEdge23.9641.7330.020.00
tarjan217.414.6010.220.01
tarjan all242.304.1310.240.06
topologicalSort184.855.4110.180.01
+
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 addVertex0.109726.704961.03e-41.60e-6
1000 addEdge6.23160.4690.015.60e-4
1000 getVertex0.052.17e+410974.61e-53.68e-7
1000 getEdge23.5342.4930.020.00
tarjan216.404.6210.220.01
tarjan all218.574.5810.220.00
topologicalSort186.635.3610.190.03
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.352823.441493.54e-45.10e-5
1000 fib add & pop3.92255.12140.006.68e-5
+
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342927.031493.42e-43.47e-6
1000 fib add & pop3.91255.63130.004.55e-5
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift206.784.8410.210.03
1000000 unshift & shift170.955.8510.170.04
1000 insertBefore0.033.75e+419062.67e-53.24e-7
+
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift200.254.9910.200.03
1000000 unshift & shift183.255.4610.180.05
1000 insertBefore0.033.64e+420052.75e-58.47e-7
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.77565.87300.005.05e-5
1000 insertBefore2.32430.56230.007.66e-5
+
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.79558.34300.006.00e-5
1000 insertBefore2.40417.00220.003.01e-4
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.4587.3150.011.45e-4
+
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.7784.9850.010.00
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push214.854.6510.210.03
1000000 shift26.0838.3430.030.00
+
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push224.484.4510.220.03
1000000 shift27.2136.7630.030.00
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push44.3222.5620.040.01
1000000 push & shift79.0812.6410.080.00
+
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push46.4621.5220.050.01
1000000 push & shift78.8812.6810.080.00
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push56.2017.7910.060.01
100000 getWords95.2610.5010.100.00
+
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push54.6218.3110.059.87e-4
100000 getWords89.2611.2010.090.00
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.22449.77230.002.65e-5
1000 add & delete randomly11.5886.3750.015.00e-4
1000 addMany3.10322.62170.001.23e-4
1000 get24.9140.1430.027.25e-4
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly13.0576.6250.013.58e-4
1000 add & delete randomly15.7663.4440.021.24e-4
1000 addMany10.6793.6850.016.84e-4
1000 get23.7242.1530.022.74e-4
1000 dfs72.3213.8310.077.21e-4
1000 bfs54.9818.1910.056.62e-4
1000 morris37.3326.7920.043.72e-4
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.34427.09220.002.19e-5
1000 add & delete randomly13.2175.7040.013.61e-4
1000 addMany2.23449.06240.004.38e-5
1000 get25.8138.7520.036.13e-4
-
-
directed-graph
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 addVertex0.109761.684981.02e-41.73e-6
1000 addEdge6.40156.2790.015.45e-4
1000 getVertex0.052.17e+410944.61e-52.85e-7
1000 getEdge22.1045.2530.020.00
tarjan209.194.7810.210.01
tarjan all211.224.7310.210.00
topologicalSort170.385.8710.170.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342921.821493.42e-43.19e-6
1000 fib add & pop3.93254.62140.007.82e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift218.294.5810.220.07
1000000 unshift & shift168.885.9210.170.03
1000 insertBefore0.033.72e+419042.69e-54.13e-7
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.77564.34300.005.91e-5
1000 insertBefore2.31432.88220.005.53e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.4287.5450.011.63e-4
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push223.274.4810.220.03
1000000 shift24.6640.5530.020.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push43.1023.2020.040.01
1000000 push & shift79.8912.5210.080.00
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push54.8118.2410.050.00
100000 getWords94.9310.5310.090.01
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.18458.66240.002.36e-5
1000 add & delete randomly11.0790.3350.011.53e-4
1000 addMany2.89346.20180.002.52e-5
1000 get24.1941.3430.021.67e-4
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly12.8877.6540.013.26e-4
1000 add & delete randomly15.7163.6540.021.42e-4
1000 addMany10.6494.0250.011.79e-4
1000 get24.0641.5630.023.48e-4
1000 dfs72.2113.8510.070.00
1000 bfs54.7418.2710.054.33e-4
1000 morris37.2626.8420.040.00
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.16462.35240.001.86e-5
1000 add & delete randomly13.5473.8750.013.91e-4
1000 addMany2.12472.08250.002.86e-5
1000 get25.2639.6030.031.83e-4
-
-
directed-graph
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 addVertex0.109972.075091.00e-41.01e-6
1000 addEdge6.12163.3590.014.88e-4
1000 getVertex0.052.17e+410994.60e-54.25e-7
1000 getEdge23.2043.1130.020.00
tarjan211.964.7210.210.01
tarjan all214.884.6510.210.00
topologicalSort173.465.7610.170.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342922.291493.42e-42.94e-6
1000 fib add & pop3.90256.37140.004.30e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift209.624.7710.210.05
1000000 unshift & shift171.615.8310.170.04
1000 insertBefore0.033.19e+419083.13e-54.47e-5
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.75571.57300.002.44e-5
1000 insertBefore2.31433.19230.005.11e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.3388.3050.011.41e-4
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push195.145.1210.200.04
1000000 shift26.2438.1030.030.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push44.3022.5720.040.01
1000000 push & shift79.5412.5710.080.00
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push56.0017.8610.060.00
100000 getWords101.669.8410.100.01
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.17460.58240.002.54e-5
1000 add & delete randomly11.2389.0550.011.99e-4
1000 addMany2.87348.16180.003.30e-5
1000 get24.5340.7730.022.11e-4
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly13.3974.6950.019.80e-4
1000 add & delete randomly16.2861.4440.029.38e-4
1000 addMany10.9491.4450.015.48e-4
1000 get24.3541.0630.020.00
1000 dfs74.5113.4210.070.00
1000 bfs56.9517.5610.060.00
1000 morris38.5925.9120.040.00
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.03493.40260.006.59e-5
1000 add & delete randomly12.8777.7050.015.53e-4
1000 addMany2.14466.33250.001.21e-4
1000 get25.9338.5620.039.04e-4
-
-
directed-graph
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 addVertex0.119341.594871.07e-44.65e-6
1000 addEdge0.011.53e+584596.55e-68.65e-7
1000 getVertex5.06e-51.98e+71e+65.06e-82.36e-9
1000 getEdge0.024.40e+423562.27e-51.22e-6
1000 tarjan [needArticulationPoints]204.764.8810.200.01
1000 tarjan all204.674.8910.200.00
1000 topologicalSort168.385.9410.170.01
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342913.641493.43e-45.05e-6
1000 fib add & pop3.93254.43130.005.15e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift227.994.3910.230.07
1000000 unshift & shift176.475.6710.180.03
1000 insertBefore0.033.72e+419062.69e-53.49e-7
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.78562.61300.006.55e-5
1000 insertBefore2.35425.30220.008.54e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.7385.2850.017.65e-4
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push227.874.3910.230.07
1000000 shift25.0839.8830.030.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push43.1023.2020.040.01
1000000 push & shift88.4111.3110.090.04
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push50.4119.8420.050.00
100000 getWords103.019.7110.100.01
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.28437.87230.001.95e-4
1000 add & delete randomly11.1689.6250.011.41e-4
1000 addMany3.00333.18170.002.62e-5
1000 get24.2741.2030.021.60e-4
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly12.9477.2850.012.22e-4
1000 add & delete randomly15.8563.1140.022.55e-4
1000 addMany10.6493.9550.013.08e-4
1000 get23.6742.2430.021.79e-4
1000 dfs72.1413.8610.075.13e-4
1000 bfs54.7418.2710.054.80e-4
1000 morris37.0427.0020.042.48e-4
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.09477.97250.001.43e-5
1000 add & delete randomly12.9277.4240.012.78e-4
1000 addMany2.20454.39240.003.52e-5
1000 get25.1839.7130.031.71e-4
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342914.731493.43e-48.46e-6
1000 fib add & pop3.92254.88140.006.46e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift194.965.1310.190.04
1000000 unshift & shift154.706.4610.150.02
1000 insertBefore0.033.71e+419212.70e-56.61e-7
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.77565.65300.004.37e-5
1000 insertBefore2.32431.45220.004.01e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.6785.6750.013.92e-4
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push212.304.7110.210.04
1000000 shift25.1739.7330.030.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push44.6522.3920.040.01
1000000 push & shift80.6612.4010.080.00
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push64.8115.4310.060.01
100000 getWords126.977.8810.130.02
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.10475.11250.002.06e-5
1000 add & delete randomly11.1489.7850.012.22e-4
1000 addMany2.89346.01180.007.29e-5
1000 get24.3541.0730.021.56e-4
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly12.8078.1150.017.83e-5
1000 add & delete randomly15.6363.9740.029.29e-5
1000 addMany10.5894.5350.011.21e-4
1000 get23.6342.3130.021.97e-4
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.31433.05220.005.43e-5
1000 add & delete randomly13.9071.9240.013.66e-4
1000 addMany2.13469.94250.004.34e-5
1000 get25.9538.5420.036.68e-4
1000 dfs73.6813.5710.070.00
1000 bfs59.2916.8710.060.01
1000 morris37.8426.4320.040.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342913.151493.43e-42.85e-6
1000 fib add & pop3.91255.50140.006.06e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift204.444.8910.200.03
1000000 unshift & shift153.336.5210.150.03
1000 insertBefore0.033.79e+419242.64e-53.02e-7
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.77564.14300.005.34e-5
1000 insertBefore2.32431.40220.007.10e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.3488.1850.011.37e-4
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push194.395.1410.190.04
1000000 shift25.4539.2930.030.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push42.4323.5720.040.01
1000000 push & shift79.4712.5810.080.00
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push54.4118.3810.050.00
100000 getWords103.789.6410.100.01
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.13468.81240.001.71e-5
1000 add & delete randomly11.7285.3650.010.00
1000 addMany2.54393.52200.002.31e-5
1000 get24.4140.9730.022.33e-4
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add66.2515.0930.070.00
1000 delete22.0045.4410560.020.04
1000 addMany10.9591.3350.010.00
1000 get33.9529.4520.030.00
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.13468.52250.001.38e-4
1000 delete randomly0.051.97e+410425.08e-52.42e-6
1000 addMany balanced2.66375.97200.001.42e-4
1000 get57.2517.4710.060.01
1000 dfs176.135.6810.180.01
1000 bfs139.297.1810.140.01
1000 morris95.2310.5010.100.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342906.831483.44e-44.91e-6
1000 fib add & pop3.94253.80140.008.47e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift192.845.1910.190.04
1000000 unshift & shift172.255.8110.170.06
1000 insertBefore0.033.57e+418932.80e-51.34e-6
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.81553.05300.001.26e-4
1000 insertBefore2.33428.33220.005.84e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.6485.8950.014.05e-4
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push187.655.3310.190.03
1000000 shift25.4839.2430.030.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push44.5122.4720.040.01
1000000 push & shift81.1212.3310.080.00
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push65.1915.3420.070.01
100000 getWords117.428.5210.120.02
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.21453.16230.002.00e-5
1000 add & delete randomly10.9691.2750.011.89e-4
1000 addMany2.61383.69200.007.84e-5
1000 get25.1339.7930.037.48e-4
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add67.5014.8230.070.00
1000 delete23.9241.8010480.020.04
1000 addMany10.8292.4250.016.56e-4
1000 get33.2330.1020.034.01e-4
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly1.96511.38270.003.28e-5
1000 delete randomly0.052.00e+410495.01e-55.38e-6
1000 addMany balanced2.66375.73200.001.64e-4
1000 get54.3118.4110.050.00
1000 dfs168.175.9510.170.00
1000 bfs147.476.7810.150.02
1000 morris104.119.6010.100.01
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.352832.051493.53e-45.74e-5
1000 fib add & pop4.02248.85140.005.56e-4
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift211.234.7310.210.03
1000000 unshift & shift180.125.5510.180.04
1000 insertBefore0.033.40e+418332.94e-54.38e-6
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.82550.20300.001.53e-4
1000 insertBefore2.37421.75220.002.85e-4
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.9883.4450.010.00
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push217.794.5910.220.02
1000000 shift27.9835.7430.030.01
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push44.7222.3620.040.01
1000000 push & shift78.6412.7210.080.00
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push59.2416.8810.060.01
100000 getWords110.049.0910.110.01
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.60384.09200.002.17e-5
1000 add & delete randomly11.5086.9650.011.09e-4
1000 addMany2.96337.68180.002.41e-5
1000 get24.3341.1030.021.87e-4
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add66.6515.0030.070.00
1000 delete22.9443.5910480.020.04
1000 addMany10.4695.5950.011.06e-4
1000 get33.1630.1520.033.69e-4
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.57388.55200.002.56e-5
1000 delete randomly0.052.05e+410774.87e-58.43e-7
1000 addMany balanced3.08324.33170.003.01e-5
1000 get54.0218.5110.050.00
1000 dfs169.215.9110.170.00
1000 bfs136.057.3510.140.00
1000 morris90.6011.0410.090.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342924.081493.42e-43.76e-6
1000 fib add & pop3.88258.00140.004.57e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift200.135.0010.200.04
1000000 unshift & shift151.886.5810.150.02
1000 insertBefore0.033.78e+419212.65e-54.68e-7
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.77565.88300.004.84e-5
1000 insertBefore2.32431.01230.007.27e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.3987.8050.011.70e-4
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push197.165.0710.200.03
1000000 shift25.3039.5230.030.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push43.5922.9420.040.01
1000000 push & shift79.4212.5910.080.00
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push54.9818.1910.050.00
100000 getWords122.288.1810.120.01
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.27440.05230.008.11e-5
1000 delete randomly0.051.85e+49485.40e-56.80e-7
1000 addMany2.99334.92180.003.05e-5
1000 get53.0918.8410.059.51e-4
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add67.1114.9030.070.00
1000 delete22.1445.1610710.020.04
1000 addMany8.95111.7560.012.26e-4
1000 get31.5131.7320.033.98e-4
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.68373.07240.000.00
1000 delete randomly0.051.96e+410565.11e-53.03e-6
1000 addMany balanced2.68373.77200.006.55e-5
1000 get55.4118.0510.060.00
1000 dfs176.115.6810.180.00
1000 bfs140.037.1410.140.00
1000 morris102.459.7610.100.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342916.001503.43e-41.26e-5
1000 fib add & pop4.62216.38140.000.00
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift197.235.0710.200.03
1000000 unshift & shift162.696.1510.160.03
1000 insertBefore0.033.63e+419072.76e-57.08e-7
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.82549.57300.001.65e-4
1000 insertBefore2.33430.03220.005.59e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.4087.7150.011.55e-4
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push194.905.1310.190.04
1000000 shift24.8340.2730.020.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push41.7123.9720.040.00
1000000 push & shift78.7212.7010.080.00
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push53.8818.5610.059.89e-4
100000 getWords98.8210.1210.100.00
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.10475.20250.002.33e-5
delete 1000 randomly0.051.87e+49475.35e-53.85e-7
addMany 10002.89345.59180.002.62e-5
get 100052.0219.2220.059.28e-4
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100066.5815.0230.070.01
delete 100025.3439.468490.030.04
addMany 10008.78113.8560.019.87e-5
get 100031.2731.9820.032.82e-4
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.15465.12240.001.88e-5
delete 1000 randomly0.052.08e+410914.80e-55.57e-7
addMany 1000 balanced2.51397.88210.003.54e-5
get 100056.5717.6810.060.00
dfs 1000170.585.8610.170.00
bfs 1000139.697.1610.140.00
morris 100097.3610.2710.100.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342923.161493.42e-44.01e-6
fib add & pop 10003.88257.61140.004.95e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000193.545.1710.190.03
unshift & shift 1000000164.746.0710.160.03
insertBefore 10000.033.72e+419082.69e-57.19e-7
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.77565.06290.008.16e-5
insertBefore 10002.31433.08220.005.99e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 1000011.4087.7350.011.86e-4
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000210.404.7510.210.05
shift 100000025.1239.8030.030.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.1123.7520.040.00
push & shift 100000078.8212.6910.080.00
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 10000052.7218.9710.050.00
getWords 10000098.3610.1710.100.00
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.07482.88250.002.62e-5
delete 1000 randomly0.061.73e+49225.77e-55.23e-6
addMany 10002.87348.56180.002.76e-5
get 100052.0819.2020.050.00
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100067.6514.7830.070.00
delete 100023.3842.7810830.020.04
addMany 10008.81113.5560.018.24e-5
get 100032.1131.1520.034.49e-4
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.15464.93240.002.37e-4
delete 1000 randomly0.052.08e+410624.81e-55.51e-7
addMany 1000 balanced2.51397.64210.005.50e-5
get 100057.8717.2810.060.01
dfs 1000168.095.9510.177.76e-4
bfs 1000143.736.9610.140.00
morris 100096.9710.3110.100.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342927.211493.42e-43.55e-6
fib add & pop 10003.91255.44140.001.98e-4
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000196.835.0810.200.02
unshift & shift 1000000152.506.5610.150.02
insertBefore 10000.033.78e+419222.65e-52.96e-7
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.76569.49290.005.19e-5
insertBefore 10002.30435.27220.004.67e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001880.370.5311.880.06
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000210.284.7610.210.03
shift 100000024.4240.9430.020.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000041.7423.9620.040.00
push & shift 100000081.4812.2710.080.01
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 10000057.4417.4110.060.00
getWords 100000129.577.7210.130.01
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.09477.46250.002.54e-5
delete 1000 randomly0.061.78e+49195.61e-51.46e-6
addMany 10002.96337.92180.007.78e-5
get 100054.2518.4310.050.00
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100067.8014.7530.070.00
delete 100022.7943.8810940.020.04
addMany 10008.83113.2460.011.42e-4
get 100030.5232.7620.030.00
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.18459.02240.007.16e-5
delete 1000 randomly0.052.06e+410834.85e-51.15e-6
addMany 1000 balanced2.53394.85210.006.11e-5
get 100056.5117.7010.060.00
dfs 1000173.685.7610.170.00
bfs 1000156.936.3710.160.04
morris 100096.7110.3410.100.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.352876.021493.48e-44.35e-5
fib add & pop 10004.09244.66140.005.12e-4
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000210.784.7410.210.05
unshift & shift 1000000161.096.2110.160.03
insertBefore 10000.033.73e+419232.68e-58.43e-7
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.85539.24300.002.91e-4
insertBefore 10002.35424.68220.002.11e-4
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001804.270.5511.800.02
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000221.644.5110.220.02
shift 100000025.7738.8030.030.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.2523.6720.040.01
push & shift 100000079.5312.5710.080.00
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 10000054.3318.4110.050.00
getWords 10000096.3810.3810.100.01
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.14468.25240.005.65e-5
delete 1000 randomly0.061.79e+49215.59e-52.02e-6
addMany 10002.91344.07180.006.78e-5
get 100051.8719.2820.050.00
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100068.3214.6430.070.01
delete 100023.8441.9510640.020.04
addMany 10008.88112.6860.011.46e-4
get 100031.5031.7420.033.96e-4
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.00500.66260.007.44e-5
delete 1000 randomly0.052.03e+410544.94e-51.86e-6
addMany 1000 balanced2.51397.65210.004.80e-5
get 100056.0917.8310.060.00
dfs 1000174.025.7510.170.00
bfs 1000141.067.0910.140.00
morris 100092.3610.8310.090.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342917.161493.43e-45.21e-6
fib add & pop 10003.89256.80140.009.36e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000190.625.2510.190.03
unshift & shift 1000000168.365.9410.170.03
insertBefore 10000.033.37e+418832.97e-56.52e-6
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.85541.77300.003.02e-4
insertBefore 10002.32431.07220.005.25e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001913.830.5211.910.10
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000216.624.6210.220.01
shift 100000027.1136.8830.030.01
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.1423.7320.040.00
push & shift 100000078.6412.7210.080.00
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 10000.492026.341524.94e-46.50e-5
getWords 10000.821221.37698.19e-42.39e-4
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.12471.67250.005.01e-5
delete 1000 randomly0.061.81e+49315.53e-57.08e-7
addMany 10002.87348.35180.003.58e-5
get 100053.7618.6010.050.00
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100066.8914.9530.070.01
delete 100028.0535.6510920.030.04
addMany 10009.09110.0160.014.39e-4
get 100030.5532.7320.030.00
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.03493.66260.003.35e-4
delete 1000 randomly0.052.20e+411164.55e-55.93e-7
addMany 1000 balanced2.65378.00200.009.59e-5
get 100067.9014.7310.070.02
dfs 1000172.245.8110.170.00
bfs 1000141.517.0710.140.00
morris 100095.2710.5010.100.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342921.081493.42e-43.52e-6
fib add & pop 10003.94253.57140.009.42e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000204.774.8810.200.03
unshift & shift 1000000164.806.0710.160.02
insertBefore 10000.033.53e+419102.83e-55.73e-6
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.77564.06300.004.03e-5
insertBefore 10002.33428.74220.005.85e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001911.530.5211.910.04
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000220.694.5310.220.04
shift 100000025.0239.9630.030.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.4323.5720.040.01
push & shift 100000080.1612.4810.080.00
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000535.251.8710.540.01
getWords 1000000954.391.0510.950.05
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.12471.05240.001.97e-5
delete 1000 randomly0.061.81e+49245.52e-56.93e-7
addMany 10002.91343.28180.004.22e-5
get 100054.1618.4710.050.00
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100066.4515.0530.070.00
delete 100023.6842.2311050.020.04
addMany 10008.88112.5660.012.72e-4
get 100033.4129.9320.030.01
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.02494.39260.004.57e-5
delete 1000 randomly0.042.23e+411414.49e-57.95e-7
addMany 1000 balanced2.66375.24200.009.32e-5
get 100062.6415.9610.060.00
dfs 1000171.075.8510.170.00
bfs 1000141.617.0610.148.60e-4
morris 100096.0910.4110.100.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342921.531483.42e-43.47e-6
fib add & pop 10003.90256.59140.006.06e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000208.244.8010.210.04
unshift & shift 1000000152.506.5610.150.01
insertBefore 10000.033.66e+419212.73e-51.79e-6
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.75571.08300.003.19e-5
insertBefore 10002.33429.11220.008.52e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001854.150.5411.850.05
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000212.744.7010.210.02
shift 100000025.1139.8230.030.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.6423.4520.040.01
push & shift 100000078.5012.7410.087.49e-4
-
-
trie
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 10000003.17315.82180.003.74e-4
getWords 10000005.00199.99110.011.85e-4
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.19457.50240.006.07e-5
delete 1000 randomly0.061.80e+49245.56e-51.04e-6
addMany 10003.02330.95170.009.53e-5
get 100052.9218.9020.050.00
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100065.9415.1730.070.00
delete 100031.5631.6810980.030.04
addMany 10008.94111.8160.013.04e-4
get 100031.5131.7320.032.99e-4
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.45408.29210.002.76e-5
delete 1000 randomly0.052.22e+411324.51e-56.97e-7
addMany 1000 balanced2.74364.65200.008.78e-5
get 100061.5416.2510.060.00
dfs 1000172.435.8010.170.00
bfs 1000140.767.1010.140.00
morris 100093.5710.6910.090.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342933.081493.41e-42.82e-6
fib add & pop 10003.89257.27140.003.17e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000192.825.1910.190.04
unshift & shift 1000000156.376.4010.160.03
insertBefore 10000.033.70e+418962.70e-53.66e-7
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.79559.70300.002.97e-4
insertBefore 10002.32430.90220.006.01e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001874.700.5311.870.04
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000209.654.7710.210.03
shift 100000025.5439.1530.030.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.4323.5720.040.01
push & shift 100000079.6012.5610.080.00
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.08479.69250.002.14e-5
delete 1000 randomly0.051.82e+49245.49e-54.16e-7
addMany 10002.88347.21180.002.69e-5
get 100052.7218.9710.050.00
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100065.0515.3730.070.00
delete 100026.2638.0811040.030.04
addMany 10008.81113.4460.019.78e-5
get 100031.4431.8020.033.59e-4
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.04490.04250.002.37e-5
delete 1000 randomly0.042.23e+411374.48e-56.04e-7
addMany 1000 balanced2.67375.13200.002.64e-4
get 100062.2516.0610.060.00
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342919.711493.43e-44.56e-6
fib add & pop 10003.88257.61140.004.79e-5
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000202.434.9410.200.02
unshift & shift 1000000158.096.3310.160.03
insertBefore 10000.033.75e+419222.67e-54.57e-7
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.77564.48300.007.71e-5
insertBefore 10002.29435.77220.003.74e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001812.540.5511.810.02
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000205.834.8610.210.03
shift 100000024.7840.3530.020.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.2923.6520.040.01
push & shift 100000078.3412.7710.080.00
-
-
-
avl-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.39418.91220.006.47e-5
delete 1000 randomly0.061.77e+49175.66e-51.90e-6
addMany 10003.32301.33170.005.90e-4
get 100055.0318.1710.060.00
-
-
binary-tree
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100066.4915.0430.070.00
delete 100024.0441.6011060.020.04
addMany 10009.05110.4460.012.88e-4
get 100032.1231.1320.036.75e-4
-
-
bst
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.27440.62230.001.42e-4
delete 1000 randomly0.052.19e+411744.57e-51.97e-6
addMany 1000 balanced2.93341.38190.001.13e-4
get 100062.8515.9110.060.01
-
-
heap
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.352878.391493.47e-41.93e-5
fib add & pop 10003.98251.35140.001.32e-4
-
-
doubly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000193.195.1810.190.04
unshift & shift 1000000170.355.8710.170.03
insertBefore 10000.033.43e+418882.91e-56.03e-6
-
-
singly-linked-list
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.79560.08290.007.70e-5
insertBefore 10002.31433.45220.005.52e-5
-
-
max-priority-queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001859.400.5411.860.03
-
-
deque
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000215.004.6510.220.01
shift 100000025.0439.9430.030.00
-
-
queue
-
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000041.8123.9220.040.00
push & shift 100000079.1712.6310.088.70e-4
-
\ No newline at end of file + +[//]: # (End of Replace Section) \ No newline at end of file diff --git a/package.json b/package.json index 4975c1b..2e7a838 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-structure-typed", - "version": "1.41.5", + "version": "1.41.6", "description": "Data Structures of Javascript & TypeScript. Binary Tree, BST, Graph, Heap, Priority Queue, Linked List, Queue, Deque, Stack, AVL Tree, Tree Multiset, Trie, Directed Graph, Undirected Graph, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue.", "main": "dist/cjs/src/index.js", "module": "dist/mjs/src/index.js", diff --git a/src/data-structures/binary-tree/bst.ts b/src/data-structures/binary-tree/bst.ts index 34e7c8e..aa85a2e 100644 --- a/src/data-structures/binary-tree/bst.ts +++ b/src/data-structures/binary-tree/bst.ts @@ -216,33 +216,6 @@ export class BST = BSTNode> return inserted; } - /** - * The function returns the first node in the binary tree that matches the given node property and - * callback. - * @param {ReturnType | N} identifier - The `nodeProperty` parameter is used to specify the - * property of the binary tree node that you want to search for. It can be either a specific key - * value (`BTNKey`) or a custom callback function (`BTNCallback`) that determines - * whether a node matches the desired property. - * @param callback - The `callback` parameter is a function that is used to determine whether a node - * matches the desired property. It takes a node as input and returns a boolean value indicating - * whether the node matches the property or not. If no callback function is provided, the default - * callback function `_defaultCallbackByKey` is used - * @param beginRoot - The `beginRoot` parameter is the starting point for the search. It specifies - * the root node from which the search should begin. - * @param iterationType - The `iterationType` parameter is used to specify the type of iteration to - * be performed when searching for nodes in the binary tree. It can have one of the following values: - * @returns either the first node that matches the given nodeProperty and callback, or null if no - * matching node is found. - */ - override getNode>( - identifier: ReturnType | null, - callback: C = this.defaultOneParamCallback as C, - beginRoot = this.root, - iterationType = this.iterationType - ): N | null { - return this.getNodes(identifier, callback, true, beginRoot, iterationType)[0] ?? null; - } - /** * The function `lastKey` returns the key of the rightmost node if the comparison result is less * than, the key of the leftmost node if the comparison result is greater than, and the key of the diff --git a/test/performance/reportor.ts b/test/performance/reportor.ts index 31d4d90..10cd22b 100644 --- a/test/performance/reportor.ts +++ b/test/performance/reportor.ts @@ -92,46 +92,49 @@ const composeReport = () => { }); } } + htmlTables += ` + +`; html += htmlTables; html += ` `; - writeIntoMarkdown(htmlTables); + replaceMarkdownContent( + '[//]: # (Start of Replace Section)', // Start tag + '[//]: # (End of Replace Section)', // end identifier + htmlTables // New content to be inserted + ); fs.writeFileSync(htmlFilePath, html); console.log(`Performance ${BOLD}${GREEN}report${END} file generated`); }; - -function writeIntoMarkdown(html: string) { +function replaceMarkdownContent(startMarker: string, endMarker: string, newText: string) { const parentDirectory = path.resolve(__dirname, '../..'); // The path to the parent directory - const markdownFilePath = path.join(parentDirectory, 'README.md'); // Path to README.md file - const textToInsert = html; - - // Read the original README.md file - fs.readFile(markdownFilePath, 'utf8', (err, data) => { + const filePath = path.join(parentDirectory, 'README.md'); // Path to README.md file + fs.readFile(filePath, 'utf8', (err, data) => { if (err) { - console.error('Unable to read README.md file:', err); + console.error(`Unable to read ${filePath}:`, err); return; } - // Find the location in the README.md file where you want to insert the text, for example under a specific tag - const insertMarker = '## Benchmark'; + // Find the start and end markers in the content + const startIndex = data.indexOf(startMarker); + const endIndex = data.indexOf(endMarker, startIndex + 1); - const index = data.indexOf(insertMarker); - if (index === -1) { - console.error('Unable to find insertion point'); + if (startIndex === -1 || endIndex === -1) { + console.error('Unable to find start or end marker'); return; } - // insert text + // Replace the old content with the new text const updatedMarkdown = - data.slice(0, index + insertMarker.length) + '\n' + textToInsert + data.slice(index + insertMarker.length); + data.slice(0, startIndex + startMarker.length) + '\n' + newText + data.slice(endIndex); - // Try writing the modified content back to the README.md file - fs.writeFile(markdownFilePath, updatedMarkdown, 'utf8', err => { + // Try writing the modified content back to the file + fs.writeFile(filePath, updatedMarkdown, 'utf8', (err) => { if (err) { - console.error('Unable to write to README.md file:', err); + console.error(`Unable to write to ${filePath}:`, err); } else { - console.log('The tables have been successfully inserted into the README.md file!'); + console.log(`The content has been successfully replaced in ${filePath}!`); } }); }); diff --git a/test/unit/data-structures/graph/undirected-graph.test.ts b/test/unit/data-structures/graph/undirected-graph.test.ts index 537cdb5..593ff50 100644 --- a/test/unit/data-structures/graph/undirected-graph.test.ts +++ b/test/unit/data-structures/graph/undirected-graph.test.ts @@ -149,17 +149,17 @@ describe('UndirectedGraph', () => { expect(degreeOfC).toBe(1); }); - it('xxx', () => { - const start = performance.now(); - const graph = new UndirectedGraph<{ fromFeatureId: number; name: string; parentName: string; distanceFromParent: number; coordinates: number[]; }, number >() - for (const v of saltyVertexes) { - graph.addVertex(v.name, v); - } - for (const e of saltyEdges) { - const [s,d] = e; - graph.addEdge( s.name, d.name, d.distanceFromParent ); - } - const result = graph.getAllPathsBetween('Intersection_1','Intersection_5'); - console.log('---xxx', performance.now() - start, result) - }) + // it('xxx', () => { + // const start = performance.now(); + // const graph = new UndirectedGraph<{ fromFeatureId: number; name: string; parentName: string; distanceFromParent: number; coordinates: number[]; }, number >() + // for (const v of saltyVertexes) { + // graph.addVertex(v.name, v); + // } + // for (const e of saltyEdges) { + // const [s,d] = e; + // graph.addEdge( s.name, d.name, d.distanceFromParent ); + // } + // const result = graph.getAllPathsBetween('Intersection_1','Intersection_5'); + // console.log('---xxx', performance.now() - start, result) + // }) });