blob: 982f3f40ac369c9d1a89d83e9c1426a9d5367b0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
? codeberg.org/snonux/algorithms/ds [no test files]
goos: linux
goarch: amd64
pkg: codeberg.org/snonux/algorithms/queue
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
BenchmarkElementaryPriority/randomInsert(1)-8 41022816 34.98 ns/op
BenchmarkElementaryPriority/randomInsertAndDeleteMax(1)-8 19580256 53.73 ns/op
BenchmarkElementaryPriority/randomInsert(100)-8 743382 1406 ns/op
BenchmarkElementaryPriority/randomInsertAndDeleteMax(100)-8 66183 19272 ns/op
BenchmarkElementaryPriority/randomInsert(10000)-8 13821 81741 ns/op
BenchmarkElementaryPriority/randomInsertAndDeleteMax(10000)-8 12 109973615 ns/op
BenchmarkHeapPriority/randomInsert(1)-8 51533078 41.09 ns/op
BenchmarkHeapPriority/randomInsertAndDeleteMax(1)-8 23826982 45.61 ns/op
BenchmarkHeapPriority/randomInsert(100)-8 511130 2141 ns/op
BenchmarkHeapPriority/randomInsertAndDeleteMax(100)-8 308568 4801 ns/op
BenchmarkHeapPriority/randomInsert(10000)-8 2870 398855 ns/op
BenchmarkHeapPriority/randomInsertAndDeleteMax(10000)-8 810 1434522 ns/op
PASS
ok codeberg.org/snonux/algorithms/queue 17.927s
goos: linux
goarch: amd64
pkg: codeberg.org/snonux/algorithms/search
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
BenchmarkElementary/random(1)-8 1000000000 0.0000008 ns/op
BenchmarkElementary/random(10)-8 1000000000 0.0000016 ns/op
BenchmarkElementary/random(100)-8 1000000000 0.0000562 ns/op
BenchmarkElementary/random(1000)-8 1000000000 0.002275 ns/op
BenchmarkElementary/random(10000)-8 1000000000 0.2372 ns/op
BenchmarkBST/random(1)-8 1000000000 0.0000002 ns/op
BenchmarkBST/random(10)-8 1000000000 0.0000009 ns/op
BenchmarkBST/random(100)-8 1000000000 0.0000125 ns/op
BenchmarkBST/random(1000)-8 1000000000 0.0002024 ns/op
BenchmarkBST/random(10000)-8 1000000000 0.003352 ns/op
BenchmarkRedBlackBST/random(1)-8 1000000000 0.0000005 ns/op
BenchmarkRedBlackBST/random(10)-8 1000000000 0.0000013 ns/op
BenchmarkRedBlackBST/random(100)-8 1000000000 0.0000154 ns/op
BenchmarkRedBlackBST/random(1000)-8 1000000000 0.0002481 ns/op
BenchmarkRedBlackBST/random(10000)-8 1000000000 0.003875 ns/op
BenchmarkHash/random(1)-8 1000000000 0.0000006 ns/op
BenchmarkHash/random(10)-8 1000000000 0.0000008 ns/op
BenchmarkHash/random(100)-8 1000000000 0.0000042 ns/op
BenchmarkHash/random(1000)-8 1000000000 0.0000368 ns/op
BenchmarkHash/random(10000)-8 1000000000 0.0005492 ns/op
BenchmarkGoMap/random(1)-8 1000000000 0.0000005 ns/op
BenchmarkGoMap/random(10)-8 1000000000 0.0000011 ns/op
BenchmarkGoMap/random(100)-8 1000000000 0.0000056 ns/op
BenchmarkGoMap/random(1000)-8 1000000000 0.0000626 ns/op
BenchmarkGoMap/random(10000)-8 1000000000 0.0007359 ns/op
PASS
ok codeberg.org/snonux/algorithms/search 3.293s
goos: linux
goarch: amd64
pkg: codeberg.org/snonux/algorithms/sort
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
BenchmarkSelectionSort/random(1)-8 24253128 59.91 ns/op
BenchmarkSelectionSort/ascending(1)-8 20499001 64.40 ns/op
BenchmarkSelectionSort/descending(1)-8 17572442 61.63 ns/op
BenchmarkSelectionSort/random(100)-8 177620 6658 ns/op
BenchmarkSelectionSort/ascending(100)-8 139441 7359 ns/op
BenchmarkSelectionSort/descending(100)-8 167274 7518 ns/op
BenchmarkSelectionSort/random(10000)-8 18 67439492 ns/op
BenchmarkSelectionSort/ascending(10000)-8 18 66410739 ns/op
BenchmarkSelectionSort/descending(10000)-8 19 58976835 ns/op
BenchmarkShellSort/random(1)-8 24425635 65.65 ns/op
BenchmarkShellSort/ascending(1)-8 17824809 63.62 ns/op
BenchmarkShellSort/descending(1)-8 17211476 58.58 ns/op
BenchmarkShellSort/random(100)-8 954313 1156 ns/op
BenchmarkShellSort/ascending(100)-8 2115876 560.2 ns/op
BenchmarkShellSort/descending(100)-8 1316583 943.6 ns/op
BenchmarkShellSort/random(10000)-8 1054 1016236 ns/op
BenchmarkShellSort/ascending(10000)-8 13384 88235 ns/op
BenchmarkShellSort/descending(10000)-8 6916 168742 ns/op
BenchmarkShellSort/random(1000000)-8 5 213635750 ns/op
BenchmarkShellSort/ascending(1000000)-8 75 16317302 ns/op
BenchmarkShellSort/descending(1000000)-8 49 28676221 ns/op
BenchmarkMergeSort/random(1)-8 18340165 76.50 ns/op
BenchmarkMergeSort/ascending(1)-8 12526510 82.14 ns/op
BenchmarkMergeSort/descending(1)-8 14738695 80.85 ns/op
BenchmarkMergeSort/random(100)-8 708734 2294 ns/op
BenchmarkMergeSort/ascending(100)-8 499148 2358 ns/op
BenchmarkMergeSort/descending(100)-8 405510 2682 ns/op
BenchmarkMergeSort/random(10000)-8 952 1141298 ns/op
BenchmarkMergeSort/ascending(10000)-8 4326 374042 ns/op
BenchmarkMergeSort/descending(10000)-8 2239 464237 ns/op
BenchmarkMergeSort/random(1000000)-8 9 126369011 ns/op
BenchmarkMergeSort/ascending(1000000)-8 32 40726188 ns/op
BenchmarkMergeSort/descending(1000000)-8 24 43865654 ns/op
BenchmarkBottomUpMergeSort/random(1)-8 12643492 82.41 ns/op
BenchmarkBottomUpMergeSort/ascending(1)-8 12174796 97.13 ns/op
BenchmarkBottomUpMergeSort/descending(1)-8 11483719 94.08 ns/op
BenchmarkBottomUpMergeSort/random(100)-8 267871 4247 ns/op
BenchmarkBottomUpMergeSort/ascending(100)-8 326781 3816 ns/op
BenchmarkBottomUpMergeSort/descending(100)-8 286783 3659 ns/op
BenchmarkBottomUpMergeSort/random(10000)-8 1423 1199019 ns/op
BenchmarkBottomUpMergeSort/ascending(10000)-8 2038 537476 ns/op
BenchmarkBottomUpMergeSort/descending(10000)-8 2659 496865 ns/op
BenchmarkBottomUpMergeSort/random(1000000)-8 8 140193143 ns/op
BenchmarkBottomUpMergeSort/ascending(1000000)-8 20 53838271 ns/op
BenchmarkBottomUpMergeSort/descending(1000000)-8 19 57529310 ns/op
BenchmarkParallelMergeSort/random(1)-8 14998593 94.53 ns/op
BenchmarkParallelMergeSort/ascending(1)-8 11933211 97.59 ns/op
BenchmarkParallelMergeSort/descending(1)-8 10920050 108.0 ns/op
BenchmarkParallelMergeSort/random(100)-8 388678 2690 ns/op
BenchmarkParallelMergeSort/ascending(100)-8 599937 2329 ns/op
BenchmarkParallelMergeSort/descending(100)-8 391761 2701 ns/op
BenchmarkParallelMergeSort/random(10000)-8 4304 278638 ns/op
BenchmarkParallelMergeSort/ascending(10000)-8 10000 111189 ns/op
BenchmarkParallelMergeSort/descending(10000)-8 8145 123689 ns/op
BenchmarkParallelMergeSort/random(1000000)-8 22 54365079 ns/op
BenchmarkParallelMergeSort/ascending(1000000)-8 84 25126522 ns/op
BenchmarkParallelMergeSort/descending(1000000)-8 54 26633504 ns/op
BenchmarkQuickSort/random(1)-8 16209184 72.21 ns/op
BenchmarkQuickSort/ascending(1)-8 16827207 70.58 ns/op
BenchmarkQuickSort/descending(1)-8 15330153 70.89 ns/op
BenchmarkQuickSort/random(100)-8 298004 3861 ns/op
BenchmarkQuickSort/ascending(100)-8 612453 1865 ns/op
BenchmarkQuickSort/descending(100)-8 577408 2142 ns/op
BenchmarkQuickSort/random(10000)-8 1639 731346 ns/op
BenchmarkQuickSort/ascending(10000)-8 5660 218499 ns/op
BenchmarkQuickSort/descending(10000)-8 5203 230777 ns/op
BenchmarkQuickSort/random(1000000)-8 10 104578634 ns/op
BenchmarkQuickSort/ascending(1000000)-8 43 27909609 ns/op
BenchmarkQuickSort/descending(1000000)-8 36 29062741 ns/op
BenchmarkParallelQuickSort/random(1)-8 28529319 74.09 ns/op
BenchmarkParallelQuickSort/ascending(1)-8 15764242 74.21 ns/op
BenchmarkParallelQuickSort/descending(1)-8 16958620 73.90 ns/op
BenchmarkParallelQuickSort/random(100)-8 302020 3992 ns/op
BenchmarkParallelQuickSort/ascending(100)-8 701608 1822 ns/op
BenchmarkParallelQuickSort/descending(100)-8 601065 2145 ns/op
BenchmarkParallelQuickSort/random(10000)-8 1315 880996 ns/op
BenchmarkParallelQuickSort/ascending(10000)-8 2118 564597 ns/op
BenchmarkParallelQuickSort/descending(10000)-8 2066 579936 ns/op
BenchmarkParallelQuickSort/random(1000000)-8 8 135171018 ns/op
BenchmarkParallelQuickSort/ascending(1000000)-8 8 127933805 ns/op
BenchmarkParallelQuickSort/descending(1000000)-8 9 135288383 ns/op
BenchmarkQuick3WaySort/random(1)-8 15157575 101.2 ns/op
BenchmarkQuick3WaySort/ascending(1)-8 11924154 101.1 ns/op
BenchmarkQuick3WaySort/descending(1)-8 11325559 102.6 ns/op
BenchmarkQuick3WaySort/random(100)-8 192588 6157 ns/op
BenchmarkQuick3WaySort/ascending(100)-8 185162 5985 ns/op
BenchmarkQuick3WaySort/descending(100)-8 200205 5975 ns/op
BenchmarkQuick3WaySort/random(10000)-8 1242 940569 ns/op
BenchmarkQuick3WaySort/ascending(10000)-8 1112 960980 ns/op
BenchmarkQuick3WaySort/descending(10000)-8 1246 968041 ns/op
BenchmarkQuick3WaySort/random(1000000)-8 8 135031754 ns/op
BenchmarkQuick3WaySort/ascending(1000000)-8 8 136998670 ns/op
BenchmarkQuick3WaySort/descending(1000000)-8 8 137313295 ns/op
PASS
ok codeberg.org/snonux/algorithms/sort 140.563s
|