You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Erik Hollensbe 71da361435 Update go.mod and fork 11 months ago
..
README.md Add a benchmark spam 11 months ago
random.go random string generator: tests and benchmarks 11 months ago
random_test.go fix cut and paste fail 11 months ago

README.md

benchmarks on 8 core vm on a mostly idle i7-4790k w/ plenty of ram:

% go test -v -bench String ./random

=== RUN   TestRandom
--- PASS: TestRandom (0.00s)
goos: linux
goarch: amd64
pkg: code.hollensbe.org/erikh/demo-code/random
BenchmarkString5Len
String generation at length: 5
String generation at length: 5
String generation at length: 5
String generation at length: 5
String generation at length: 5
BenchmarkString5Len-8            2645406               446 ns/op
BenchmarkString25Len
String generation at length: 25
String generation at length: 25
String generation at length: 25
String generation at length: 25
String generation at length: 25
BenchmarkString25Len-8           2413048               511 ns/op
BenchmarkString100Len
String generation at length: 100
String generation at length: 100
String generation at length: 100
String generation at length: 100
BenchmarkString100Len-8          1000000              1128 ns/op
BenchmarkString500Len
String generation at length: 500
String generation at length: 500
String generation at length: 500
String generation at length: 500
BenchmarkString500Len-8           377850              3169 ns/op
PASS
ok      code.hollensbe.org/erikh/demo-code/random       5.759s