Skip to content

Instantly share code, notes, and snippets.

@akutz
Created October 23, 2017 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akutz/7d527e27ddc05f73b0b817c311dee494 to your computer and use it in GitHub Desktop.
Save akutz/7d527e27ddc05f73b0b817c311dee494 to your computer and use it in GitHub Desktop.
The benchmark results for the sortfold repo.
$ go test -benchmem -run Bench -bench . -v
goos: darwin
goarch: amd64
pkg: github.com/akutz/sortfold
Benchmark_FoldedSort______2_Chars____LowerCase_Sorted-8 30000000 40.5 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort______2_Chars____LowerCase_Sorted-8 30000000 49.3 ns/op 0 B/op 0 allocs/op
Benchmark_FoldedSort______2_Chars____LowerCase_Shuffled-8 30000000 46.4 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort______2_Chars____LowerCase_Shuffled-8 20000000 59.7 ns/op 0 B/op 0 allocs/op
Benchmark_FoldedSort______2_Chars____MixedCase_Sorted-8 50000000 37.9 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort______2_Chars____MixedCase_Sorted-8 10000000 114 ns/op 8 B/op 2 allocs/op
Benchmark_FoldedSort______2_Chars__1_MixedCase_Shuffled-8 50000000 39.4 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort______2_Chars__1_MixedCase_Shuffled-8 10000000 113 ns/op 8 B/op 2 allocs/op
Benchmark_FoldedSort_____26_Chars____LowerCase_Sorted-8 500000 2889 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort_____26_Chars____LowerCase_Sorted-8 500000 2584 ns/op 0 B/op 0 allocs/op
Benchmark_FoldedSort_____26_Chars____LowerCase_Shuffled-8 500000 2803 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort_____26_Chars____LowerCase_Shuffled-8 500000 4112 ns/op 0 B/op 0 allocs/op
Benchmark_FoldedSort_____26_Chars__1_MixedCase_Sorted-8 500000 2694 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort_____26_Chars__1_MixedCase_Sorted-8 500000 2677 ns/op 40 B/op 10 allocs/op
Benchmark_FoldedSort_____26_Chars__1_MixedCase_Shuffled-8 500000 2821 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort_____26_Chars__1_MixedCase_Shuffled-8 300000 5272 ns/op 72 B/op 18 allocs/op
Benchmark_FoldedSort_____26_Chars__5_MixedCase_Sorted-8 1000000 1647 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort_____26_Chars__5_MixedCase_Sorted-8 500000 3448 ns/op 160 B/op 40 allocs/op
Benchmark_FoldedSort_____26_Chars__5_MixedCase_Shuffled-8 1000000 2594 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort_____26_Chars__5_MixedCase_Shuffled-8 300000 5918 ns/op 280 B/op 70 allocs/op
Benchmark_FoldedSort_____26_Chars_10_MixedCase_Sorted-8 1000000 1496 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort_____26_Chars_10_MixedCase_Sorted-8 300000 4417 ns/op 328 B/op 82 allocs/op
Benchmark_FoldedSort_____26_Chars_10_MixedCase_Shuffled-8 1000000 2113 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort_____26_Chars_10_MixedCase_Shuffled-8 200000 7425 ns/op 536 B/op 134 allocs/op
Benchmark_FoldedSort____542_Words____MixedCase_Sorted-8 10000 149475 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort____542_Words____MixedCase_Sorted-8 3000 477477 ns/op 20400 B/op 2046 allocs/op
Benchmark_FoldedSort____542_Words____MixedCase_Shuffled-8 10000 195502 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort____542_Words____MixedCase_Shuffled-8 3000 542718 ns/op 21856 B/op 2208 allocs/op
Benchmark_FoldedSort__54200_Words____MixedCase_Shuffled-8 100 16854892 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort__54200_Words____MixedCase_Shuffled-8 30 53410004 ns/op 2307312 B/op 216820 allocs/op
Benchmark_FoldedSort_542000_Words____MixedCase_Shuffled-8 10 176222982 ns/op 0 B/op 0 allocs/op
Benchmark_LCasedSort_542000_Words____MixedCase_Shuffled-8 2 545716283 ns/op 30080968 B/op 3180838 allocs/op
PASS
ok github.com/akutz/sortfold 93.355s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment