Skip to content

Commit 1f9bdd0

Browse files
committed
re-run all benchmarks
1 parent b1a1329 commit 1f9bdd0

File tree

2 files changed

+139
-84
lines changed

2 files changed

+139
-84
lines changed

README.md

+135-82
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ $ go test -bench . -benchmem
9595
goos: darwin
9696
goarch: amd64
9797
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
98-
BenchmarkBase64decode-8 10392879 113.0 ns/op 32 B/op 2 allocs/op
99-
BenchmarkBase64regex-8 57847 20692 ns/op 21402 B/op 198 allocs/op
98+
BenchmarkBase64decode-8 10198723 112.8 ns/op 32 B/op 2 allocs/op
99+
BenchmarkBase64regex-8 58482 20558 ns/op 21386 B/op 198 allocs/op
100100
PASS
101-
ok _/Users/simonwaldherr/git/golang-benchmarks/base64 2.862s
101+
ok _/Users/simonwaldherr/git/golang-benchmarks/base64 2.916s
102102
```
103103

104104
### between
@@ -191,12 +191,12 @@ $ go test -bench . -benchmem
191191
goos: darwin
192192
goarch: amd64
193193
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
194-
BenchmarkNumberRegEx-8 82962 14182 ns/op 16134 B/op 142 allocs/op
195-
BenchmarkFulltextRegEx-8 105804 11551 ns/op 11624 B/op 104 allocs/op
196-
BenchmarkNumberParse-8 20271368 58.98 ns/op 0 B/op 0 allocs/op
197-
BenchmarkFulltextParse-8 1378227 862.0 ns/op 32 B/op 2 allocs/op
194+
BenchmarkNumberRegEx-8 80149 14071 ns/op 16124 B/op 142 allocs/op
195+
BenchmarkFulltextRegEx-8 105717 11528 ns/op 11620 B/op 104 allocs/op
196+
BenchmarkNumberParse-8 19965660 58.24 ns/op 0 B/op 0 allocs/op
197+
BenchmarkFulltextParse-8 1374366 867.1 ns/op 32 B/op 2 allocs/op
198198
PASS
199-
ok _/Users/simonwaldherr/git/golang-benchmarks/between 6.154s
199+
ok _/Users/simonwaldherr/git/golang-benchmarks/between 6.084s
200200
```
201201

202202
### caseinsensitivecompare
@@ -239,11 +239,11 @@ $ go test -bench . -benchmem
239239
goos: darwin
240240
goarch: amd64
241241
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
242-
BenchmarkEqualFold-8 27838581 42.00 ns/op 0 B/op 0 allocs/op
243-
BenchmarkToUpper-8 10077690 117.8 ns/op 16 B/op 3 allocs/op
244-
BenchmarkToLower-8 7114912 167.0 ns/op 20 B/op 5 allocs/op
242+
BenchmarkEqualFold-8 28574598 42.27 ns/op 0 B/op 0 allocs/op
243+
BenchmarkToUpper-8 9949413 116.8 ns/op 16 B/op 3 allocs/op
244+
BenchmarkToLower-8 7146228 166.7 ns/op 20 B/op 5 allocs/op
245245
PASS
246-
ok _/Users/simonwaldherr/git/golang-benchmarks/caseinsensitivecompare 4.139s
246+
ok _/Users/simonwaldherr/git/golang-benchmarks/caseinsensitivecompare 4.060s
247247
```
248248

249249
### concat
@@ -290,11 +290,11 @@ $ go test -bench . -benchmem
290290
goos: darwin
291291
goarch: amd64
292292
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
293-
BenchmarkConcatString-8 1000000 58616 ns/op 503996 B/op 1 allocs/op
294-
BenchmarkConcatBuffer-8 213813675 5.563 ns/op 2 B/op 0 allocs/op
295-
BenchmarkConcatBuilder-8 534258118 3.607 ns/op 5 B/op 0 allocs/op
293+
BenchmarkConcatString-8 983566 53286 ns/op 495778 B/op 1 allocs/op
294+
BenchmarkConcatBuffer-8 211378735 5.613 ns/op 2 B/op 0 allocs/op
295+
BenchmarkConcatBuilder-8 567207608 3.007 ns/op 5 B/op 0 allocs/op
296296
PASS
297-
ok _/Users/simonwaldherr/git/golang-benchmarks/concat 62.855s
297+
ok _/Users/simonwaldherr/git/golang-benchmarks/concat 56.377s
298298
```
299299

300300
### contains
@@ -445,16 +445,16 @@ $ go test -bench . -benchmem
445445
goos: darwin
446446
goarch: amd64
447447
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
448-
BenchmarkContains-8 132850357 8.837 ns/op 0 B/op 0 allocs/op
449-
BenchmarkContainsNot-8 143617837 8.359 ns/op 0 B/op 0 allocs/op
450-
BenchmarkContainsBytes-8 100000000 10.66 ns/op 0 B/op 0 allocs/op
451-
BenchmarkContainsBytesNot-8 131014630 9.182 ns/op 0 B/op 0 allocs/op
452-
BenchmarkCompileMatch-8 13421883 87.29 ns/op 0 B/op 0 allocs/op
453-
BenchmarkCompileMatchNot-8 26279617 43.83 ns/op 0 B/op 0 allocs/op
454-
BenchmarkMatch-8 717747 1508 ns/op 1377 B/op 17 allocs/op
455-
BenchmarkMatchNot-8 813543 1447 ns/op 1377 B/op 17 allocs/op
448+
BenchmarkContains-8 132489130 8.901 ns/op 0 B/op 0 allocs/op
449+
BenchmarkContainsNot-8 143257419 8.380 ns/op 0 B/op 0 allocs/op
450+
BenchmarkContainsBytes-8 100000000 10.30 ns/op 0 B/op 0 allocs/op
451+
BenchmarkContainsBytesNot-8 128818006 9.177 ns/op 0 B/op 0 allocs/op
452+
BenchmarkCompileMatch-8 13899483 84.72 ns/op 0 B/op 0 allocs/op
453+
BenchmarkCompileMatchNot-8 26848288 42.93 ns/op 0 B/op 0 allocs/op
454+
BenchmarkMatch-8 669385 1533 ns/op 1377 B/op 17 allocs/op
455+
BenchmarkMatchNot-8 806822 1461 ns/op 1377 B/op 17 allocs/op
456456
PASS
457-
ok _/Users/simonwaldherr/git/golang-benchmarks/contains 12.338s
457+
ok _/Users/simonwaldherr/git/golang-benchmarks/contains 12.243s
458458
```
459459

460460
### foreach
@@ -542,12 +542,12 @@ $ go test -bench . -benchmem
542542
goos: darwin
543543
goarch: amd64
544544
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
545-
BenchmarkForMap-8 45083404 24.80 ns/op 0 B/op 0 allocs/op
546-
BenchmarkRangeMap-8 17697049 68.63 ns/op 0 B/op 0 allocs/op
547-
BenchmarkRangeSlice-8 452862094 2.613 ns/op 0 B/op 0 allocs/op
548-
BenchmarkRangeSliceKey-8 261722010 4.541 ns/op 0 B/op 0 allocs/op
545+
BenchmarkForMap-8 47580643 24.84 ns/op 0 B/op 0 allocs/op
546+
BenchmarkRangeMap-8 17819958 66.66 ns/op 0 B/op 0 allocs/op
547+
BenchmarkRangeSlice-8 442172340 2.673 ns/op 0 B/op 0 allocs/op
548+
BenchmarkRangeSliceKey-8 261661130 4.466 ns/op 0 B/op 0 allocs/op
549549
PASS
550-
ok _/Users/simonwaldherr/git/golang-benchmarks/foreach 5.702s
550+
ok _/Users/simonwaldherr/git/golang-benchmarks/foreach 5.721s
551551
```
552552

553553
### hash
@@ -574,6 +574,7 @@ import (
574574
"github.com/jzelinskie/whirlpool"
575575
"github.com/reusee/mmh3"
576576
"github.com/zeebo/blake3"
577+
"golang.org/x/crypto/bcrypt"
577578
"golang.org/x/crypto/blake2b"
578579
"golang.org/x/crypto/md4"
579580
"golang.org/x/crypto/ripemd160"
@@ -592,10 +593,46 @@ func benchmarkHashAlgo(b *testing.B, h hash.Hash) {
592593
}
593594
}
594595

596+
func benchmarkBCryptHashAlgo(b *testing.B, cost int) {
597+
data := make([]byte, 2048)
598+
rand.Read(data)
599+
600+
b.ResetTimer()
601+
for n := 0; n < b.N; n++ {
602+
bcrypt.GenerateFromPassword(data, cost)
603+
}
604+
}
605+
595606
func BenchmarkAdler32(b *testing.B) {
596607
benchmarkHashAlgo(b, adler32.New())
597608
}
598609

610+
func BenchmarkBCryptCost4(b *testing.B) {
611+
benchmarkBCryptHashAlgo(b, 4)
612+
}
613+
614+
func BenchmarkBCryptCost10(b *testing.B) {
615+
benchmarkBCryptHashAlgo(b, 10)
616+
}
617+
618+
func BenchmarkBCryptCost16(b *testing.B) {
619+
benchmarkBCryptHashAlgo(b, 16)
620+
}
621+
622+
/*
623+
func BenchmarkBCryptCost22(b *testing.B) {
624+
benchmarkBCryptHashAlgo(b, 22)
625+
}
626+
627+
func BenchmarkBCryptCost28(b *testing.B) {
628+
benchmarkBCryptHashAlgo(b, 28)
629+
}
630+
631+
func BenchmarkBCryptCost31(b *testing.B) {
632+
benchmarkBCryptHashAlgo(b, 31)
633+
}
634+
*/
635+
599636
func BenchmarkBlake2b256(b *testing.B) {
600637
h, err := blake2b.New256(nil)
601638
if err != nil {
@@ -699,40 +736,56 @@ func BenchmarkRIPEMD160(b *testing.B) {
699736
func BenchmarkWhirlpool(b *testing.B) {
700737
benchmarkHashAlgo(b, whirlpool.New())
701738
}
739+
740+
func BenchmarkSHA256Parallel(b *testing.B) {
741+
b.RunParallel(func(pb *testing.PB) {
742+
data := make([]byte, 2048)
743+
rand.Read(data)
744+
for pb.Next() {
745+
h := sha256.New()
746+
h.Write(data)
747+
h.Sum(nil)
748+
}
749+
})
750+
}
702751
```
703752

704753
```
705754
$ go test -bench . -benchmem
706755
goos: darwin
707756
goarch: amd64
708757
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
709-
BenchmarkAdler32-8 1445772 812.5 ns/op 8 B/op 1 allocs/op
710-
BenchmarkBlake2b256-8 550945 2114 ns/op 32 B/op 1 allocs/op
711-
BenchmarkBlake2b512-8 566251 2153 ns/op 64 B/op 1 allocs/op
712-
BenchmarkBlake3256-8 498813 2424 ns/op 64 B/op 2 allocs/op
713-
BenchmarkMMH3-8 2704191 431.5 ns/op 16 B/op 1 allocs/op
714-
BenchmarkCRC32-8 8429592 141.8 ns/op 8 B/op 1 allocs/op
715-
BenchmarkCRC64ISO-8 1000000 1188 ns/op 8 B/op 1 allocs/op
716-
BenchmarkCRC64ECMA-8 1000000 1155 ns/op 8 B/op 1 allocs/op
717-
BenchmarkFnv32-8 504458 2368 ns/op 8 B/op 1 allocs/op
718-
BenchmarkFnv32a-8 495302 2394 ns/op 8 B/op 1 allocs/op
719-
BenchmarkFnv64-8 489283 2386 ns/op 8 B/op 1 allocs/op
720-
BenchmarkFnv64a-8 513638 2360 ns/op 8 B/op 1 allocs/op
721-
BenchmarkFnv128-8 232702 4988 ns/op 16 B/op 1 allocs/op
722-
BenchmarkFnv128a-8 255332 4762 ns/op 16 B/op 1 allocs/op
723-
BenchmarkMD4-8 175627 6766 ns/op 24 B/op 2 allocs/op
724-
BenchmarkMD5-8 402585 3050 ns/op 16 B/op 1 allocs/op
725-
BenchmarkSHA1-8 457730 2548 ns/op 24 B/op 1 allocs/op
726-
BenchmarkSHA224-8 213870 5510 ns/op 32 B/op 1 allocs/op
727-
BenchmarkSHA256-8 222966 5410 ns/op 32 B/op 1 allocs/op
728-
BenchmarkSHA384-8 318090 3861 ns/op 48 B/op 1 allocs/op
729-
BenchmarkSHA512-8 301585 3901 ns/op 64 B/op 1 allocs/op
730-
BenchmarkSHA3256-8 175510 6918 ns/op 512 B/op 3 allocs/op
731-
BenchmarkSHA3512-8 96080 12236 ns/op 576 B/op 3 allocs/op
732-
BenchmarkRIPEMD160-8 96097 12325 ns/op 24 B/op 1 allocs/op
733-
BenchmarkWhirlpool-8 23215 51528 ns/op 64 B/op 1 allocs/op
758+
BenchmarkAdler32-8 1455771 833.2 ns/op 8 B/op 1 allocs/op
759+
BenchmarkBCryptCost4-8 1197 994206 ns/op 8188 B/op 10 allocs/op
760+
BenchmarkBCryptCost10-8 19 60281238 ns/op 8240 B/op 10 allocs/op
761+
BenchmarkBCryptCost16-8 1 3857295354 ns/op 9232 B/op 12 allocs/op
762+
BenchmarkBlake2b256-8 559878 2109 ns/op 32 B/op 1 allocs/op
763+
BenchmarkBlake2b512-8 566155 2145 ns/op 64 B/op 1 allocs/op
764+
BenchmarkBlake3256-8 509133 2420 ns/op 64 B/op 2 allocs/op
765+
BenchmarkMMH3-8 2756125 433.5 ns/op 16 B/op 1 allocs/op
766+
BenchmarkCRC32-8 8472420 139.7 ns/op 8 B/op 1 allocs/op
767+
BenchmarkCRC64ISO-8 1000000 1160 ns/op 8 B/op 1 allocs/op
768+
BenchmarkCRC64ECMA-8 1000000 1146 ns/op 8 B/op 1 allocs/op
769+
BenchmarkFnv32-8 500517 2344 ns/op 8 B/op 1 allocs/op
770+
BenchmarkFnv32a-8 501921 2347 ns/op 8 B/op 1 allocs/op
771+
BenchmarkFnv64-8 492074 2324 ns/op 8 B/op 1 allocs/op
772+
BenchmarkFnv64a-8 501223 2401 ns/op 8 B/op 1 allocs/op
773+
BenchmarkFnv128-8 236252 5035 ns/op 16 B/op 1 allocs/op
774+
BenchmarkFnv128a-8 246698 4751 ns/op 16 B/op 1 allocs/op
775+
BenchmarkMD4-8 178916 6781 ns/op 24 B/op 2 allocs/op
776+
BenchmarkMD5-8 383076 3010 ns/op 16 B/op 1 allocs/op
777+
BenchmarkSHA1-8 427220 2503 ns/op 24 B/op 1 allocs/op
778+
BenchmarkSHA224-8 209106 5521 ns/op 32 B/op 1 allocs/op
779+
BenchmarkSHA256-8 224252 5442 ns/op 32 B/op 1 allocs/op
780+
BenchmarkSHA384-8 306945 3900 ns/op 48 B/op 1 allocs/op
781+
BenchmarkSHA512-8 300844 3828 ns/op 64 B/op 1 allocs/op
782+
BenchmarkSHA3256-8 168063 7048 ns/op 512 B/op 3 allocs/op
783+
BenchmarkSHA3512-8 99657 12278 ns/op 576 B/op 3 allocs/op
784+
BenchmarkRIPEMD160-8 96824 12569 ns/op 24 B/op 1 allocs/op
785+
BenchmarkWhirlpool-8 23083 50987 ns/op 64 B/op 1 allocs/op
786+
BenchmarkSHA256Parallel-8 877912 1296 ns/op 32 B/op 1 allocs/op
734787
PASS
735-
ok _/Users/simonwaldherr/git/golang-benchmarks/hash 32.849s
788+
ok _/Users/simonwaldherr/git/golang-benchmarks/hash 40.107s
736789
```
737790

738791
### index
@@ -816,10 +869,10 @@ $ go test -bench . -benchmem
816869
goos: darwin
817870
goarch: amd64
818871
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
819-
BenchmarkMapStringKeys-8 12468453 96.15 ns/op 0 B/op 0 allocs/op
820-
BenchmarkMapIntKeys-8 20191738 70.13 ns/op 0 B/op 0 allocs/op
872+
BenchmarkMapStringKeys-8 12648686 96.75 ns/op 0 B/op 0 allocs/op
873+
BenchmarkMapIntKeys-8 18840115 59.19 ns/op 0 B/op 0 allocs/op
821874
PASS
822-
ok _/Users/simonwaldherr/git/golang-benchmarks/index 4.096s
875+
ok _/Users/simonwaldherr/git/golang-benchmarks/index 3.841s
823876
```
824877

825878
### json
@@ -911,10 +964,10 @@ $ go test -bench . -benchmem
911964
goos: darwin
912965
goarch: amd64
913966
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
914-
BenchmarkJsonMarshal-8 655389 1674 ns/op 480 B/op 5 allocs/op
915-
BenchmarkJsonUnmarshal-8 164905 7454 ns/op 2136 B/op 39 allocs/op
967+
BenchmarkJsonMarshal-8 644528 1696 ns/op 480 B/op 5 allocs/op
968+
BenchmarkJsonUnmarshal-8 170461 7192 ns/op 2136 B/op 39 allocs/op
916969
PASS
917-
ok _/Users/simonwaldherr/git/golang-benchmarks/json 2.589s
970+
ok _/Users/simonwaldherr/git/golang-benchmarks/json 2.576s
918971
```
919972

920973
### math
@@ -998,14 +1051,14 @@ $ go test -bench . -benchmem
9981051
goos: darwin
9991052
goarch: amd64
10001053
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
1001-
BenchmarkMathInt8-8 1000000000 0.2945 ns/op 0 B/op 0 allocs/op
1002-
BenchmarkMathInt32-8 1000000000 0.2948 ns/op 0 B/op 0 allocs/op
1003-
BenchmarkMathInt64-8 1000000000 0.2899 ns/op 0 B/op 0 allocs/op
1004-
BenchmarkMathAtomicInt32-8 229933556 5.154 ns/op 0 B/op 0 allocs/op
1005-
BenchmarkMathAtomicInt64-8 237830610 5.151 ns/op 0 B/op 0 allocs/op
1006-
BenchmarkMathMutexInt-8 81810609 14.57 ns/op 0 B/op 0 allocs/op
1007-
BenchmarkMathFloat32-8 1000000000 0.2897 ns/op 0 B/op 0 allocs/op
1008-
BenchmarkMathFloat64-8 1000000000 0.2838 ns/op 0 B/op 0 allocs/op
1054+
BenchmarkMathInt8-8 1000000000 0.2968 ns/op 0 B/op 0 allocs/op
1055+
BenchmarkMathInt32-8 1000000000 0.2922 ns/op 0 B/op 0 allocs/op
1056+
BenchmarkMathInt64-8 1000000000 0.2859 ns/op 0 B/op 0 allocs/op
1057+
BenchmarkMathAtomicInt32-8 232589906 5.129 ns/op 0 B/op 0 allocs/op
1058+
BenchmarkMathAtomicInt64-8 238598892 5.140 ns/op 0 B/op 0 allocs/op
1059+
BenchmarkMathMutexInt-8 81166124 14.67 ns/op 0 B/op 0 allocs/op
1060+
BenchmarkMathFloat32-8 1000000000 0.2906 ns/op 0 B/op 0 allocs/op
1061+
BenchmarkMathFloat64-8 1000000000 0.2906 ns/op 0 B/op 0 allocs/op
10091062
PASS
10101063
ok _/Users/simonwaldherr/git/golang-benchmarks/math 6.438s
10111064
```
@@ -1054,11 +1107,11 @@ $ go test -bench . -benchmem
10541107
goos: darwin
10551108
goarch: amd64
10561109
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
1057-
BenchmarkParseBool-8 1000000000 0.5670 ns/op 0 B/op 0 allocs/op
1058-
BenchmarkParseInt-8 80651084 14.35 ns/op 0 B/op 0 allocs/op
1059-
BenchmarkParseFloat-8 13993488 83.36 ns/op 0 B/op 0 allocs/op
1110+
BenchmarkParseBool-8 1000000000 0.5761 ns/op 0 B/op 0 allocs/op
1111+
BenchmarkParseInt-8 78462346 14.67 ns/op 0 B/op 0 allocs/op
1112+
BenchmarkParseFloat-8 14368068 82.19 ns/op 0 B/op 0 allocs/op
10601113
PASS
1061-
ok _/Users/simonwaldherr/git/golang-benchmarks/parse 3.226s
1114+
ok _/Users/simonwaldherr/git/golang-benchmarks/parse 3.233s
10621115
```
10631116

10641117
### random
@@ -1122,11 +1175,11 @@ $ go test -bench . -benchmem
11221175
goos: darwin
11231176
goarch: amd64
11241177
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
1125-
BenchmarkMathRand-8 45587134 25.03 ns/op 0 B/op 0 allocs/op
1126-
BenchmarkCryptoRand-8 1000000 1050 ns/op 56 B/op 4 allocs/op
1127-
BenchmarkCryptoRandString-8 7158721 166.4 ns/op 128 B/op 3 allocs/op
1178+
BenchmarkMathRand-8 47096974 25.41 ns/op 0 B/op 0 allocs/op
1179+
BenchmarkCryptoRand-8 1000000 1046 ns/op 56 B/op 4 allocs/op
1180+
BenchmarkCryptoRandString-8 7160967 168.0 ns/op 128 B/op 3 allocs/op
11281181
PASS
1129-
ok _/Users/simonwaldherr/git/golang-benchmarks/random 3.757s
1182+
ok _/Users/simonwaldherr/git/golang-benchmarks/random 3.826s
11301183
```
11311184

11321185
### regexp
@@ -1181,10 +1234,10 @@ $ go test -bench . -benchmem
11811234
goos: darwin
11821235
goarch: amd64
11831236
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
1184-
BenchmarkMatchString-8 133282 8577 ns/op 9962 B/op 86 allocs/op
1185-
BenchmarkMatchStringCompiled-8 2401635 492.7 ns/op 0 B/op 0 allocs/op
1186-
BenchmarkMatchStringGolibs-8 2404368 492.7 ns/op 0 B/op 0 allocs/op
1237+
BenchmarkMatchString-8 119838 8785 ns/op 9970 B/op 86 allocs/op
1238+
BenchmarkMatchStringCompiled-8 2427822 508.8 ns/op 0 B/op 0 allocs/op
1239+
BenchmarkMatchStringGolibs-8 2307103 525.1 ns/op 0 B/op 0 allocs/op
11871240
PASS
1188-
ok _/Users/simonwaldherr/git/golang-benchmarks/regexp 4.793s
1241+
ok _/Users/simonwaldherr/git/golang-benchmarks/regexp 4.800s
11891242
```
11901243

hash/hash_test.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
)
2828

2929
func benchmarkHashAlgo(b *testing.B, h hash.Hash) {
30-
data := make([]byte, 10)
30+
data := make([]byte, 2048)
3131
rand.Read(data)
3232

3333
b.ResetTimer()
@@ -39,7 +39,7 @@ func benchmarkHashAlgo(b *testing.B, h hash.Hash) {
3939
}
4040

4141
func benchmarkBCryptHashAlgo(b *testing.B, cost int) {
42-
data := make([]byte, 10)
42+
data := make([]byte, 2048)
4343
rand.Read(data)
4444

4545
b.ResetTimer()
@@ -64,6 +64,7 @@ func BenchmarkBCryptCost16(b *testing.B) {
6464
benchmarkBCryptHashAlgo(b, 16)
6565
}
6666

67+
/*
6768
func BenchmarkBCryptCost22(b *testing.B) {
6869
benchmarkBCryptHashAlgo(b, 22)
6970
}
@@ -75,6 +76,7 @@ func BenchmarkBCryptCost28(b *testing.B) {
7576
func BenchmarkBCryptCost31(b *testing.B) {
7677
benchmarkBCryptHashAlgo(b, 31)
7778
}
79+
*/
7880

7981
func BenchmarkBlake2b256(b *testing.B) {
8082
h, err := blake2b.New256(nil)

0 commit comments

Comments
 (0)