summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2020-08-08 17:02:58 +0100
committerPaul Buetow <pbuetow@mimecast.com>2020-08-08 17:02:58 +0100
commit36573e16d9e8b511aec24a82797a5d13ceef6aa4 (patch)
treeb2f293261e3758daf38816562e5095905aba3f74
parent6b87d5ad02ded52fb9bb0c44677e564dae7ac3b3 (diff)
fortune not found
Quick commit
-rw-r--r--sort/sort_test.go2
-rw-r--r--sortbench.out.txt166
2 files changed, 167 insertions, 1 deletions
diff --git a/sort/sort_test.go b/sort/sort_test.go
index a3aa441..024cde4 100644
--- a/sort/sort_test.go
+++ b/sort/sort_test.go
@@ -11,7 +11,7 @@ var benchResult ds.ArrayList
const minLength int = 1
const maxLength int = 100000
-const maxSlowLength int = 10000
+const maxSlowLength int = 100000
var arrayListCache map[string]ds.ArrayList
diff --git a/sortbench.out.txt b/sortbench.out.txt
new file mode 100644
index 0000000..603457f
--- /dev/null
+++ b/sortbench.out.txt
@@ -0,0 +1,166 @@
+goos: darwin
+goarch: amd64
+BenchmarkInsertionSort/random(1)-12 185191676 6.16 ns/op
+BenchmarkInsertionSort/ascending(1)-12 177869570 6.66 ns/op
+BenchmarkInsertionSort/descending(1)-12 186771874 6.24 ns/op
+BenchmarkInsertionSort/random(10)-12 34482441 36.2 ns/op
+BenchmarkInsertionSort/ascending(10)-12 82419602 14.8 ns/op
+BenchmarkInsertionSort/descending(10)-12 26885938 44.0 ns/op
+BenchmarkInsertionSort/random(100)-12 558688 2273 ns/op
+BenchmarkInsertionSort/ascending(100)-12 13367913 90.2 ns/op
+BenchmarkInsertionSort/descending(100)-12 275616 4419 ns/op
+BenchmarkInsertionSort/random(1000)-12 6034 197029 ns/op
+BenchmarkInsertionSort/ascending(1000)-12 1451596 815 ns/op
+BenchmarkInsertionSort/descending(1000)-12 3201 380806 ns/op
+BenchmarkInsertionSort/random(10000)-12 45 24109528 ns/op
+BenchmarkInsertionSort/ascending(10000)-12 132128 9104 ns/op
+BenchmarkInsertionSort/descending(10000)-12 20 55910217 ns/op
+BenchmarkInsertionSort/random(100000)-12 1 2764039277 ns/op
+BenchmarkInsertionSort/ascending(100000)-12 10000 100853 ns/op
+BenchmarkInsertionSort/descending(100000)-12 1 5532816500 ns/op
+BenchmarkSelectionSort/random(1)-12 188115730 6.48 ns/op
+BenchmarkSelectionSort/ascending(1)-12 172595838 6.99 ns/op
+BenchmarkSelectionSort/descending(1)-12 186447632 6.59 ns/op
+BenchmarkSelectionSort/random(10)-12 16414581 72.6 ns/op
+BenchmarkSelectionSort/ascending(10)-12 18589161 63.8 ns/op
+BenchmarkSelectionSort/descending(10)-12 18247290 65.9 ns/op
+BenchmarkSelectionSort/random(100)-12 195650 6246 ns/op
+BenchmarkSelectionSort/ascending(100)-12 222948 5486 ns/op
+BenchmarkSelectionSort/descending(100)-12 223107 5582 ns/op
+BenchmarkSelectionSort/random(1000)-12 1966 620017 ns/op
+BenchmarkSelectionSort/ascending(1000)-12 2414 504120 ns/op
+BenchmarkSelectionSort/descending(1000)-12 2666 450313 ns/op
+BenchmarkSelectionSort/random(10000)-12 21 62379675 ns/op
+BenchmarkSelectionSort/ascending(10000)-12 22 50335774 ns/op
+BenchmarkSelectionSort/descending(10000)-12 26 45239092 ns/op
+BenchmarkSelectionSort/random(100000)-12 1 5342742609 ns/op
+BenchmarkSelectionSort/ascending(100000)-12 1 5292252348 ns/op
+BenchmarkSelectionSort/descending(100000)-12 1 4786950901 ns/op
+BenchmarkShellSort/random(1)-12 146403772 8.12 ns/op
+BenchmarkShellSort/ascending(1)-12 132845919 9.14 ns/op
+BenchmarkShellSort/descending(1)-12 144606938 8.35 ns/op
+BenchmarkShellSort/random(10)-12 31809394 37.5 ns/op
+BenchmarkShellSort/ascending(10)-12 43800141 27.6 ns/op
+BenchmarkShellSort/descending(10)-12 30931777 38.7 ns/op
+BenchmarkShellSort/random(100)-12 1486393 810 ns/op
+BenchmarkShellSort/ascending(100)-12 3125997 383 ns/op
+BenchmarkShellSort/descending(100)-12 2117821 565 ns/op
+BenchmarkShellSort/random(1000)-12 25338 47730 ns/op
+BenchmarkShellSort/ascending(1000)-12 238173 5037 ns/op
+BenchmarkShellSort/descending(1000)-12 125845 9530 ns/op
+BenchmarkShellSort/random(10000)-12 1502 790908 ns/op
+BenchmarkShellSort/ascending(10000)-12 17401 68595 ns/op
+BenchmarkShellSort/descending(10000)-12 9061 132463 ns/op
+BenchmarkShellSort/random(100000)-12 100 11297544 ns/op
+BenchmarkShellSort/ascending(100000)-12 1311 909844 ns/op
+BenchmarkShellSort/descending(100000)-12 705 1696059 ns/op
+BenchmarkMergeSort/random(1)-12 51213560 23.2 ns/op
+BenchmarkMergeSort/ascending(1)-12 49885765 24.0 ns/op
+BenchmarkMergeSort/descending(1)-12 52045089 23.8 ns/op
+BenchmarkMergeSort/random(10)-12 5548945 216 ns/op
+BenchmarkMergeSort/ascending(10)-12 5773369 207 ns/op
+BenchmarkMergeSort/descending(10)-12 5537724 218 ns/op
+BenchmarkMergeSort/random(100)-12 382633 3160 ns/op
+BenchmarkMergeSort/ascending(100)-12 424848 2798 ns/op
+BenchmarkMergeSort/descending(100)-12 430767 2875 ns/op
+BenchmarkMergeSort/random(1000)-12 15291 78268 ns/op
+BenchmarkMergeSort/ascending(1000)-12 32217 37163 ns/op
+BenchmarkMergeSort/descending(1000)-12 33654 35714 ns/op
+BenchmarkMergeSort/random(10000)-12 1138 1049027 ns/op
+BenchmarkMergeSort/ascending(10000)-12 2659 450463 ns/op
+BenchmarkMergeSort/descending(10000)-12 2793 426970 ns/op
+BenchmarkMergeSort/random(100000)-12 91 12698152 ns/op
+BenchmarkMergeSort/ascending(100000)-12 237 5045138 ns/op
+BenchmarkMergeSort/descending(100000)-12 253 4625460 ns/op
+BenchmarkBottomUpMergeSort/random(1)-12 51337423 23.3 ns/op
+BenchmarkBottomUpMergeSort/ascending(1)-12 49782834 23.8 ns/op
+BenchmarkBottomUpMergeSort/descending(1)-12 51987176 23.1 ns/op
+BenchmarkBottomUpMergeSort/random(10)-12 6412479 185 ns/op
+BenchmarkBottomUpMergeSort/ascending(10)-12 6866996 175 ns/op
+BenchmarkBottomUpMergeSort/descending(10)-12 7007492 171 ns/op
+BenchmarkBottomUpMergeSort/random(100)-12 441226 2731 ns/op
+BenchmarkBottomUpMergeSort/ascending(100)-12 506797 2370 ns/op
+BenchmarkBottomUpMergeSort/descending(100)-12 531980 2248 ns/op
+BenchmarkBottomUpMergeSort/random(1000)-12 18375 65393 ns/op
+BenchmarkBottomUpMergeSort/ascending(1000)-12 41853 28879 ns/op
+BenchmarkBottomUpMergeSort/descending(1000)-12 43447 27072 ns/op
+BenchmarkBottomUpMergeSort/random(10000)-12 1406 847700 ns/op
+BenchmarkBottomUpMergeSort/ascending(10000)-12 3405 351707 ns/op
+BenchmarkBottomUpMergeSort/descending(10000)-12 3678 327359 ns/op
+BenchmarkBottomUpMergeSort/random(100000)-12 100 10491347 ns/op
+BenchmarkBottomUpMergeSort/ascending(100000)-12 280 4237733 ns/op
+BenchmarkBottomUpMergeSort/descending(100000)-12 308 3889405 ns/op
+BenchmarkParallelMergeSort/random(1)-12 51079491 23.2 ns/op
+BenchmarkParallelMergeSort/ascending(1)-12 51485551 23.3 ns/op
+BenchmarkParallelMergeSort/descending(1)-12 52451577 22.8 ns/op
+BenchmarkParallelMergeSort/random(10)-12 5778379 208 ns/op
+BenchmarkParallelMergeSort/ascending(10)-12 6133795 196 ns/op
+BenchmarkParallelMergeSort/descending(10)-12 5884753 203 ns/op
+BenchmarkParallelMergeSort/random(100)-12 425317 2823 ns/op
+BenchmarkParallelMergeSort/ascending(100)-12 470197 2567 ns/op
+BenchmarkParallelMergeSort/descending(100)-12 463288 2559 ns/op
+BenchmarkParallelMergeSort/random(1000)-12 24284 50121 ns/op
+BenchmarkParallelMergeSort/ascending(1000)-12 41224 29380 ns/op
+BenchmarkParallelMergeSort/descending(1000)-12 41024 30052 ns/op
+BenchmarkParallelMergeSort/random(10000)-12 3810 318941 ns/op
+BenchmarkParallelMergeSort/ascending(10000)-12 6375 192611 ns/op
+BenchmarkParallelMergeSort/descending(10000)-12 6460 192708 ns/op
+BenchmarkParallelMergeSort/random(100000)-12 327 3683511 ns/op
+BenchmarkParallelMergeSort/ascending(100000)-12 582 2008277 ns/op
+BenchmarkParallelMergeSort/descending(100000)-12 650 1901811 ns/op
+BenchmarkQuickSort/random(1)-12 72292761 16.7 ns/op
+BenchmarkQuickSort/ascending(1)-12 62966443 18.6 ns/op
+BenchmarkQuickSort/descending(1)-12 70938814 17.0 ns/op
+BenchmarkQuickSort/random(10)-12 19279712 63.0 ns/op
+BenchmarkQuickSort/ascending(10)-12 35741108 34.2 ns/op
+BenchmarkQuickSort/descending(10)-12 13182141 91.0 ns/op
+BenchmarkQuickSort/random(100)-12 203592 5890 ns/op
+BenchmarkQuickSort/ascending(100)-12 411717 2906 ns/op
+BenchmarkQuickSort/descending(100)-12 363048 3293 ns/op
+BenchmarkQuickSort/random(1000)-12 14533 82609 ns/op
+BenchmarkQuickSort/ascending(1000)-12 35744 33438 ns/op
+BenchmarkQuickSort/descending(1000)-12 35011 34278 ns/op
+BenchmarkQuickSort/random(10000)-12 1203 999418 ns/op
+BenchmarkQuickSort/ascending(10000)-12 3343 359536 ns/op
+BenchmarkQuickSort/descending(10000)-12 3189 376077 ns/op
+BenchmarkQuickSort/random(100000)-12 98 11999977 ns/op
+BenchmarkQuickSort/ascending(100000)-12 301 3967846 ns/op
+BenchmarkQuickSort/descending(100000)-12 290 4117395 ns/op
+BenchmarkParallelQuickSort/random(1)-12 25789150 46.4 ns/op
+BenchmarkParallelQuickSort/ascending(1)-12 25822897 46.4 ns/op
+BenchmarkParallelQuickSort/descending(1)-12 25840588 46.4 ns/op
+BenchmarkParallelQuickSort/random(10)-12 2553927 470 ns/op
+BenchmarkParallelQuickSort/ascending(10)-12 2549085 472 ns/op
+BenchmarkParallelQuickSort/descending(10)-12 2555283 470 ns/op
+BenchmarkParallelQuickSort/random(100)-12 134710 8913 ns/op
+BenchmarkParallelQuickSort/ascending(100)-12 134775 8905 ns/op
+BenchmarkParallelQuickSort/descending(100)-12 134242 8902 ns/op
+BenchmarkParallelQuickSort/random(1000)-12 9840 120282 ns/op
+BenchmarkParallelQuickSort/ascending(1000)-12 9874 120290 ns/op
+BenchmarkParallelQuickSort/descending(1000)-12 9777 122471 ns/op
+BenchmarkParallelQuickSort/random(10000)-12 787 1497865 ns/op
+BenchmarkParallelQuickSort/ascending(10000)-12 805 1480583 ns/op
+BenchmarkParallelQuickSort/descending(10000)-12 807 1479967 ns/op
+BenchmarkParallelQuickSort/random(100000)-12 75 16360966 ns/op
+BenchmarkParallelQuickSort/ascending(100000)-12 73 16357520 ns/op
+BenchmarkParallelQuickSort/descending(100000)-12 72 16271690 ns/op
+BenchmarkQuick3WaySort/random(1)-12 25797298 46.4 ns/op
+BenchmarkQuick3WaySort/ascending(1)-12 25742936 46.6 ns/op
+BenchmarkQuick3WaySort/descending(1)-12 25745505 46.5 ns/op
+BenchmarkQuick3WaySort/random(10)-12 2526182 455 ns/op
+BenchmarkQuick3WaySort/ascending(10)-12 2630720 449 ns/op
+BenchmarkQuick3WaySort/descending(10)-12 2779174 432 ns/op
+BenchmarkQuick3WaySort/random(100)-12 151275 7864 ns/op
+BenchmarkQuick3WaySort/ascending(100)-12 156942 7696 ns/op
+BenchmarkQuick3WaySort/descending(100)-12 158992 7343 ns/op
+BenchmarkQuick3WaySort/random(1000)-12 13093 88764 ns/op
+BenchmarkQuick3WaySort/ascending(1000)-12 13512 85740 ns/op
+BenchmarkQuick3WaySort/descending(1000)-12 14120 82866 ns/op
+BenchmarkQuick3WaySort/random(10000)-12 1212 978004 ns/op
+BenchmarkQuick3WaySort/ascending(10000)-12 1254 951177 ns/op
+BenchmarkQuick3WaySort/descending(10000)-12 1293 927122 ns/op
+BenchmarkQuick3WaySort/random(100000)-12 100 10649151 ns/op
+BenchmarkQuick3WaySort/ascending(100000)-12 100 10448896 ns/op
+BenchmarkQuick3WaySort/descending(100000)-12 100 10284277 ns/op
+PASS
+ok _/Users/pbuetow/git/algorithms/sort 243.786s