Skip to content

Commit 0aa6f88

Browse files
committed
rerun with go 1.20rc1
1 parent e056cd8 commit 0aa6f88

File tree

4 files changed

+149
-105
lines changed

4 files changed

+149
-105
lines changed

README.md

+114-101
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ If you\'re interested in new programming languages, you should definitely take a
4343

4444
## Benchmark Results
4545

46-
Golang Version: [go version go1.19](https://tip.golang.org/doc/go1.19) [darwin/amd64](https://go.dev/dl/go1.19.darwin-amd64.pkg)
46+
Golang Version: [go version 1.20rc1](https://tip.golang.org/doc/go1.20) [darwin/amd64](https://go.dev/dl/go1.20rc1.darwin-amd64.pkg)
4747
Hardware Spec: [Apple MacBook Pro 15-Inch "Core i7" 2.9 Touch/Late 2016](https://support.apple.com/kb/SP749) [(?)](https://everymac.com/systems/apple/macbook_pro/specs/macbook-pro-core-i7-2.9-15-late-2016-retina-display-touch-bar-specs.html)
4848

4949
### base64
@@ -92,14 +92,15 @@ func BenchmarkBase64regex(b *testing.B) {
9292
```
9393

9494
```
95-
$ go test -bench . -benchmem
95+
$ go1.20rc1 test -bench . -benchmem
9696
goos: darwin
9797
goarch: amd64
98+
pkg: github.com/SimonWaldherr/golang-benchmarks/base64
9899
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
99-
BenchmarkBase64decode-8 10198723 112.8 ns/op 32 B/op 2 allocs/op
100-
BenchmarkBase64regex-8 58482 20558 ns/op 21386 B/op 198 allocs/op
100+
BenchmarkBase64decode-8 9149145 116.3 ns/op 32 B/op 2 allocs/op
101+
BenchmarkBase64regex-8 55594 22842 ns/op 21426 B/op 198 allocs/op
101102
PASS
102-
ok _/Users/simonwaldherr/git/golang-benchmarks/base64 2.916s
103+
ok github.com/SimonWaldherr/golang-benchmarks/base64 2.863s
103104
```
104105

105106
### between
@@ -188,16 +189,17 @@ func BenchmarkFulltextParse(b *testing.B) {
188189
```
189190

190191
```
191-
$ go test -bench . -benchmem
192+
$ go1.20rc1 test -bench . -benchmem
192193
goos: darwin
193194
goarch: amd64
195+
pkg: github.com/SimonWaldherr/golang-benchmarks/between
194196
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
195-
BenchmarkNumberRegEx-8 80149 14071 ns/op 16124 B/op 142 allocs/op
196-
BenchmarkFulltextRegEx-8 105717 11528 ns/op 11620 B/op 104 allocs/op
197-
BenchmarkNumberParse-8 19965660 58.24 ns/op 0 B/op 0 allocs/op
198-
BenchmarkFulltextParse-8 1374366 867.1 ns/op 32 B/op 2 allocs/op
197+
BenchmarkNumberRegEx-8 81928 14497 ns/op 16159 B/op 142 allocs/op
198+
BenchmarkFulltextRegEx-8 101804 11854 ns/op 11652 B/op 104 allocs/op
199+
BenchmarkNumberParse-8 20246128 58.77 ns/op 0 B/op 0 allocs/op
200+
BenchmarkFulltextParse-8 1284960 941.0 ns/op 32 B/op 2 allocs/op
199201
PASS
200-
ok _/Users/simonwaldherr/git/golang-benchmarks/between 6.084s
202+
ok github.com/SimonWaldherr/golang-benchmarks/between 6.206s
201203
```
202204

203205
### caseinsensitivecompare
@@ -236,15 +238,16 @@ func BenchmarkToLower(b *testing.B) {
236238
```
237239

238240
```
239-
$ go test -bench . -benchmem
241+
$ go1.20rc1 test -bench . -benchmem
240242
goos: darwin
241243
goarch: amd64
244+
pkg: github.com/SimonWaldherr/golang-benchmarks/caseinsensitivecompare
242245
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
243-
BenchmarkEqualFold-8 28574598 42.27 ns/op 0 B/op 0 allocs/op
244-
BenchmarkToUpper-8 9949413 116.8 ns/op 16 B/op 3 allocs/op
245-
BenchmarkToLower-8 7146228 166.7 ns/op 20 B/op 5 allocs/op
246+
BenchmarkEqualFold-8 54119030 21.70 ns/op 0 B/op 0 allocs/op
247+
BenchmarkToUpper-8 8427060 141.1 ns/op 16 B/op 3 allocs/op
248+
BenchmarkToLower-8 5690838 203.9 ns/op 20 B/op 5 allocs/op
246249
PASS
247-
ok _/Users/simonwaldherr/git/golang-benchmarks/caseinsensitivecompare 4.060s
250+
ok github.com/SimonWaldherr/golang-benchmarks/caseinsensitivecompare 4.941s
248251
```
249252

250253
### concat
@@ -287,15 +290,16 @@ func BenchmarkConcatBuilder(b *testing.B) {
287290
```
288291

289292
```
290-
$ go test -bench . -benchmem
293+
$ go1.20rc1 test -bench . -benchmem
291294
goos: darwin
292295
goarch: amd64
296+
pkg: github.com/SimonWaldherr/golang-benchmarks/concat
293297
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
294-
BenchmarkConcatString-8 983566 53286 ns/op 495778 B/op 1 allocs/op
295-
BenchmarkConcatBuffer-8 211378735 5.613 ns/op 2 B/op 0 allocs/op
296-
BenchmarkConcatBuilder-8 567207608 3.007 ns/op 5 B/op 0 allocs/op
298+
BenchmarkConcatString-8 1000000 58957 ns/op 503996 B/op 1 allocs/op
299+
BenchmarkConcatBuffer-8 191486371 5.917 ns/op 2 B/op 0 allocs/op
300+
BenchmarkConcatBuilder-8 564555268 3.761 ns/op 5 B/op 0 allocs/op
297301
PASS
298-
ok _/Users/simonwaldherr/git/golang-benchmarks/concat 56.377s
302+
ok github.com/SimonWaldherr/golang-benchmarks/concat 63.405s
299303
```
300304

301305
### contains
@@ -442,20 +446,21 @@ func BenchmarkMatchNot(b *testing.B) {
442446
```
443447

444448
```
445-
$ go test -bench . -benchmem
449+
$ go1.20rc1 test -bench . -benchmem
446450
goos: darwin
447451
goarch: amd64
452+
pkg: github.com/SimonWaldherr/golang-benchmarks/contains
448453
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
449-
BenchmarkContains-8 132489130 8.901 ns/op 0 B/op 0 allocs/op
450-
BenchmarkContainsNot-8 143257419 8.380 ns/op 0 B/op 0 allocs/op
451-
BenchmarkContainsBytes-8 100000000 10.30 ns/op 0 B/op 0 allocs/op
452-
BenchmarkContainsBytesNot-8 128818006 9.177 ns/op 0 B/op 0 allocs/op
453-
BenchmarkCompileMatch-8 13899483 84.72 ns/op 0 B/op 0 allocs/op
454-
BenchmarkCompileMatchNot-8 26848288 42.93 ns/op 0 B/op 0 allocs/op
455-
BenchmarkMatch-8 669385 1533 ns/op 1377 B/op 17 allocs/op
456-
BenchmarkMatchNot-8 806822 1461 ns/op 1377 B/op 17 allocs/op
454+
BenchmarkContains-8 126402836 9.459 ns/op 0 B/op 0 allocs/op
455+
BenchmarkContainsNot-8 138730138 8.737 ns/op 0 B/op 0 allocs/op
456+
BenchmarkContainsBytes-8 100000000 10.34 ns/op 0 B/op 0 allocs/op
457+
BenchmarkContainsBytesNot-8 129333506 9.578 ns/op 0 B/op 0 allocs/op
458+
BenchmarkCompileMatch-8 13750730 86.43 ns/op 0 B/op 0 allocs/op
459+
BenchmarkCompileMatchNot-8 27747145 44.47 ns/op 0 B/op 0 allocs/op
460+
BenchmarkMatch-8 701185 1566 ns/op 1392 B/op 17 allocs/op
461+
BenchmarkMatchNot-8 790365 1490 ns/op 1393 B/op 17 allocs/op
457462
PASS
458-
ok _/Users/simonwaldherr/git/golang-benchmarks/contains 12.243s
463+
ok github.com/SimonWaldherr/golang-benchmarks/contains 12.566s
459464
```
460465

461466
### foreach
@@ -539,16 +544,17 @@ func BenchmarkRangeSliceKey(b *testing.B) {
539544
```
540545

541546
```
542-
$ go test -bench . -benchmem
547+
$ go1.20rc1 test -bench . -benchmem
543548
goos: darwin
544549
goarch: amd64
550+
pkg: github.com/SimonWaldherr/golang-benchmarks/foreach
545551
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
546-
BenchmarkForMap-8 47580643 24.84 ns/op 0 B/op 0 allocs/op
547-
BenchmarkRangeMap-8 17819958 66.66 ns/op 0 B/op 0 allocs/op
548-
BenchmarkRangeSlice-8 442172340 2.673 ns/op 0 B/op 0 allocs/op
549-
BenchmarkRangeSliceKey-8 261661130 4.466 ns/op 0 B/op 0 allocs/op
552+
BenchmarkForMap-8 42500185 25.22 ns/op 0 B/op 0 allocs/op
553+
BenchmarkRangeMap-8 17044197 70.83 ns/op 0 B/op 0 allocs/op
554+
BenchmarkRangeSlice-8 260559393 4.515 ns/op 0 B/op 0 allocs/op
555+
BenchmarkRangeSliceKey-8 262198653 4.577 ns/op 0 B/op 0 allocs/op
550556
PASS
551-
ok _/Users/simonwaldherr/git/golang-benchmarks/foreach 5.721s
557+
ok github.com/SimonWaldherr/golang-benchmarks/foreach 5.860s
552558
```
553559

554560
### hash
@@ -752,41 +758,42 @@ func BenchmarkSHA256Parallel(b *testing.B) {
752758
```
753759

754760
```
755-
$ go test -bench . -benchmem
761+
$ go1.20rc1 test -bench . -benchmem
756762
goos: darwin
757763
goarch: amd64
764+
pkg: github.com/SimonWaldherr/golang-benchmarks/hash
758765
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
759-
BenchmarkAdler32-8 1455771 833.2 ns/op 8 B/op 1 allocs/op
760-
BenchmarkBCryptCost4-8 1197 994206 ns/op 8188 B/op 10 allocs/op
761-
BenchmarkBCryptCost10-8 19 60281238 ns/op 8240 B/op 10 allocs/op
762-
BenchmarkBCryptCost16-8 1 3857295354 ns/op 9232 B/op 12 allocs/op
763-
BenchmarkBlake2b256-8 559878 2109 ns/op 32 B/op 1 allocs/op
764-
BenchmarkBlake2b512-8 566155 2145 ns/op 64 B/op 1 allocs/op
765-
BenchmarkBlake3256-8 509133 2420 ns/op 64 B/op 2 allocs/op
766-
BenchmarkMMH3-8 2756125 433.5 ns/op 16 B/op 1 allocs/op
767-
BenchmarkCRC32-8 8472420 139.7 ns/op 8 B/op 1 allocs/op
768-
BenchmarkCRC64ISO-8 1000000 1160 ns/op 8 B/op 1 allocs/op
769-
BenchmarkCRC64ECMA-8 1000000 1146 ns/op 8 B/op 1 allocs/op
770-
BenchmarkFnv32-8 500517 2344 ns/op 8 B/op 1 allocs/op
771-
BenchmarkFnv32a-8 501921 2347 ns/op 8 B/op 1 allocs/op
772-
BenchmarkFnv64-8 492074 2324 ns/op 8 B/op 1 allocs/op
773-
BenchmarkFnv64a-8 501223 2401 ns/op 8 B/op 1 allocs/op
774-
BenchmarkFnv128-8 236252 5035 ns/op 16 B/op 1 allocs/op
775-
BenchmarkFnv128a-8 246698 4751 ns/op 16 B/op 1 allocs/op
776-
BenchmarkMD4-8 178916 6781 ns/op 24 B/op 2 allocs/op
777-
BenchmarkMD5-8 383076 3010 ns/op 16 B/op 1 allocs/op
778-
BenchmarkSHA1-8 427220 2503 ns/op 24 B/op 1 allocs/op
779-
BenchmarkSHA224-8 209106 5521 ns/op 32 B/op 1 allocs/op
780-
BenchmarkSHA256-8 224252 5442 ns/op 32 B/op 1 allocs/op
781-
BenchmarkSHA384-8 306945 3900 ns/op 48 B/op 1 allocs/op
782-
BenchmarkSHA512-8 300844 3828 ns/op 64 B/op 1 allocs/op
783-
BenchmarkSHA3256-8 168063 7048 ns/op 512 B/op 3 allocs/op
784-
BenchmarkSHA3512-8 99657 12278 ns/op 576 B/op 3 allocs/op
785-
BenchmarkRIPEMD160-8 96824 12569 ns/op 24 B/op 1 allocs/op
786-
BenchmarkWhirlpool-8 23083 50987 ns/op 64 B/op 1 allocs/op
787-
BenchmarkSHA256Parallel-8 877912 1296 ns/op 32 B/op 1 allocs/op
766+
BenchmarkAdler32-8 1383434 839.5 ns/op 8 B/op 1 allocs/op
767+
BenchmarkBCryptCost4-8 1183 1049485 ns/op 8189 B/op 10 allocs/op
768+
BenchmarkBCryptCost10-8 19 62314700 ns/op 8240 B/op 10 allocs/op
769+
BenchmarkBCryptCost16-8 1 3994803560 ns/op 9232 B/op 12 allocs/op
770+
BenchmarkBlake2b256-8 548281 2189 ns/op 32 B/op 1 allocs/op
771+
BenchmarkBlake2b512-8 548671 2185 ns/op 64 B/op 1 allocs/op
772+
BenchmarkBlake3256-8 508759 2382 ns/op 64 B/op 2 allocs/op
773+
BenchmarkMMH3-8 2578842 474.2 ns/op 16 B/op 1 allocs/op
774+
BenchmarkCRC32-8 8359364 144.5 ns/op 8 B/op 1 allocs/op
775+
BenchmarkCRC64ISO-8 1000000 1182 ns/op 8 B/op 1 allocs/op
776+
BenchmarkCRC64ECMA-8 991363 1185 ns/op 8 B/op 1 allocs/op
777+
BenchmarkFnv32-8 497052 2393 ns/op 8 B/op 1 allocs/op
778+
BenchmarkFnv32a-8 505558 2398 ns/op 8 B/op 1 allocs/op
779+
BenchmarkFnv64-8 504351 2429 ns/op 8 B/op 1 allocs/op
780+
BenchmarkFnv64a-8 497160 2409 ns/op 8 B/op 1 allocs/op
781+
BenchmarkFnv128-8 236016 5047 ns/op 16 B/op 1 allocs/op
782+
BenchmarkFnv128a-8 246570 4882 ns/op 16 B/op 1 allocs/op
783+
BenchmarkMD4-8 177866 6917 ns/op 24 B/op 2 allocs/op
784+
BenchmarkMD5-8 390128 3077 ns/op 16 B/op 1 allocs/op
785+
BenchmarkSHA1-8 457599 2472 ns/op 24 B/op 1 allocs/op
786+
BenchmarkSHA224-8 216232 5584 ns/op 32 B/op 1 allocs/op
787+
BenchmarkSHA256-8 219811 5502 ns/op 32 B/op 1 allocs/op
788+
BenchmarkSHA384-8 315589 3849 ns/op 48 B/op 1 allocs/op
789+
BenchmarkSHA512-8 308853 3887 ns/op 64 B/op 1 allocs/op
790+
BenchmarkSHA3256-8 167014 7105 ns/op 512 B/op 3 allocs/op
791+
BenchmarkSHA3512-8 97266 12284 ns/op 576 B/op 3 allocs/op
792+
BenchmarkRIPEMD160-8 95233 12337 ns/op 24 B/op 1 allocs/op
793+
BenchmarkWhirlpool-8 24200 49715 ns/op 64 B/op 1 allocs/op
794+
BenchmarkSHA256Parallel-8 930120 1285 ns/op 32 B/op 1 allocs/op
788795
PASS
789-
ok _/Users/simonwaldherr/git/golang-benchmarks/hash 40.107s
796+
ok github.com/SimonWaldherr/golang-benchmarks/hash 40.820s
790797
```
791798

792799
### index
@@ -866,14 +873,15 @@ func BenchmarkMapIntKeys(b *testing.B) {
866873
```
867874

868875
```
869-
$ go test -bench . -benchmem
876+
$ go1.20rc1 test -bench . -benchmem
870877
goos: darwin
871878
goarch: amd64
879+
pkg: github.com/SimonWaldherr/golang-benchmarks/index
872880
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
873-
BenchmarkMapStringKeys-8 12648686 96.75 ns/op 0 B/op 0 allocs/op
874-
BenchmarkMapIntKeys-8 18840115 59.19 ns/op 0 B/op 0 allocs/op
881+
BenchmarkMapStringKeys-8 10658427 116.7 ns/op 0 B/op 0 allocs/op
882+
BenchmarkMapIntKeys-8 17466549 68.94 ns/op 0 B/op 0 allocs/op
875883
PASS
876-
ok _/Users/simonwaldherr/git/golang-benchmarks/index 3.841s
884+
ok github.com/SimonWaldherr/golang-benchmarks/index 4.191s
877885
```
878886

879887
### json
@@ -961,14 +969,15 @@ func BenchmarkJsonUnmarshal(b *testing.B) {
961969
```
962970

963971
```
964-
$ go test -bench . -benchmem
972+
$ go1.20rc1 test -bench . -benchmem
965973
goos: darwin
966974
goarch: amd64
975+
pkg: github.com/SimonWaldherr/golang-benchmarks/json
967976
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
968-
BenchmarkJsonMarshal-8 644528 1696 ns/op 480 B/op 5 allocs/op
969-
BenchmarkJsonUnmarshal-8 170461 7192 ns/op 2136 B/op 39 allocs/op
977+
BenchmarkJsonMarshal-8 832465 1427 ns/op 480 B/op 5 allocs/op
978+
BenchmarkJsonUnmarshal-8 181747 6575 ns/op 1912 B/op 34 allocs/op
970979
PASS
971-
ok _/Users/simonwaldherr/git/golang-benchmarks/json 2.576s
980+
ok github.com/SimonWaldherr/golang-benchmarks/json 3.630s
972981
```
973982

974983
### math
@@ -1048,20 +1057,21 @@ func BenchmarkMathFloat64(b *testing.B) {
10481057
```
10491058

10501059
```
1051-
$ go test -bench . -benchmem
1060+
$ go1.20rc1 test -bench . -benchmem
10521061
goos: darwin
10531062
goarch: amd64
1063+
pkg: github.com/SimonWaldherr/golang-benchmarks/math
10541064
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
1055-
BenchmarkMathInt8-8 1000000000 0.2968 ns/op 0 B/op 0 allocs/op
1056-
BenchmarkMathInt32-8 1000000000 0.2922 ns/op 0 B/op 0 allocs/op
1057-
BenchmarkMathInt64-8 1000000000 0.2859 ns/op 0 B/op 0 allocs/op
1058-
BenchmarkMathAtomicInt32-8 232589906 5.129 ns/op 0 B/op 0 allocs/op
1059-
BenchmarkMathAtomicInt64-8 238598892 5.140 ns/op 0 B/op 0 allocs/op
1060-
BenchmarkMathMutexInt-8 81166124 14.67 ns/op 0 B/op 0 allocs/op
1061-
BenchmarkMathFloat32-8 1000000000 0.2906 ns/op 0 B/op 0 allocs/op
1062-
BenchmarkMathFloat64-8 1000000000 0.2906 ns/op 0 B/op 0 allocs/op
1065+
BenchmarkMathInt8-8 1000000000 0.2977 ns/op 0 B/op 0 allocs/op
1066+
BenchmarkMathInt32-8 1000000000 0.2926 ns/op 0 B/op 0 allocs/op
1067+
BenchmarkMathInt64-8 1000000000 0.3199 ns/op 0 B/op 0 allocs/op
1068+
BenchmarkMathAtomicInt32-8 208174467 5.255 ns/op 0 B/op 0 allocs/op
1069+
BenchmarkMathAtomicInt64-8 225697537 5.247 ns/op 0 B/op 0 allocs/op
1070+
BenchmarkMathMutexInt-8 81434982 14.84 ns/op 0 B/op 0 allocs/op
1071+
BenchmarkMathFloat32-8 1000000000 0.2921 ns/op 0 B/op 0 allocs/op
1072+
BenchmarkMathFloat64-8 1000000000 0.3047 ns/op 0 B/op 0 allocs/op
10631073
PASS
1064-
ok _/Users/simonwaldherr/git/golang-benchmarks/math 6.438s
1074+
ok github.com/SimonWaldherr/golang-benchmarks/math 6.457s
10651075
```
10661076

10671077
### parse
@@ -1104,15 +1114,16 @@ func BenchmarkParseFloat(b *testing.B) {
11041114
```
11051115

11061116
```
1107-
$ go test -bench . -benchmem
1117+
$ go1.20rc1 test -bench . -benchmem
11081118
goos: darwin
11091119
goarch: amd64
1120+
pkg: github.com/SimonWaldherr/golang-benchmarks/parse
11101121
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
1111-
BenchmarkParseBool-8 1000000000 0.5761 ns/op 0 B/op 0 allocs/op
1112-
BenchmarkParseInt-8 78462346 14.67 ns/op 0 B/op 0 allocs/op
1113-
BenchmarkParseFloat-8 14368068 82.19 ns/op 0 B/op 0 allocs/op
1122+
BenchmarkParseBool-8 1000000000 0.5873 ns/op 0 B/op 0 allocs/op
1123+
BenchmarkParseInt-8 86040322 14.20 ns/op 0 B/op 0 allocs/op
1124+
BenchmarkParseFloat-8 13081989 93.10 ns/op 0 B/op 0 allocs/op
11141125
PASS
1115-
ok _/Users/simonwaldherr/git/golang-benchmarks/parse 3.233s
1126+
ok github.com/SimonWaldherr/golang-benchmarks/parse 3.365s
11161127
```
11171128

11181129
### random
@@ -1172,15 +1183,16 @@ func GenerateRandomString(s int) (string, error) {
11721183
```
11731184

11741185
```
1175-
$ go test -bench . -benchmem
1186+
$ go1.20rc1 test -bench . -benchmem
11761187
goos: darwin
11771188
goarch: amd64
1189+
pkg: github.com/SimonWaldherr/golang-benchmarks/random
11781190
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
1179-
BenchmarkMathRand-8 47096974 25.41 ns/op 0 B/op 0 allocs/op
1180-
BenchmarkCryptoRand-8 1000000 1046 ns/op 56 B/op 4 allocs/op
1181-
BenchmarkCryptoRandString-8 7160967 168.0 ns/op 128 B/op 3 allocs/op
1191+
BenchmarkMathRand-8 42963141 26.42 ns/op 0 B/op 0 allocs/op
1192+
BenchmarkCryptoRand-8 1000000 1057 ns/op 48 B/op 3 allocs/op
1193+
BenchmarkCryptoRandString-8 6896492 173.1 ns/op 128 B/op 3 allocs/op
11821194
PASS
1183-
ok _/Users/simonwaldherr/git/golang-benchmarks/random 3.826s
1195+
ok github.com/SimonWaldherr/golang-benchmarks/random 3.768s
11841196
```
11851197

11861198
### regexp
@@ -1231,14 +1243,15 @@ func BenchmarkMatchStringGolibs(b *testing.B) {
12311243
```
12321244

12331245
```
1234-
$ go test -bench . -benchmem
1246+
$ go1.20rc1 test -bench . -benchmem
12351247
goos: darwin
12361248
goarch: amd64
1249+
pkg: github.com/SimonWaldherr/golang-benchmarks/regexp
12371250
cpu: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
1238-
BenchmarkMatchString-8 119838 8785 ns/op 9970 B/op 86 allocs/op
1239-
BenchmarkMatchStringCompiled-8 2427822 508.8 ns/op 0 B/op 0 allocs/op
1240-
BenchmarkMatchStringGolibs-8 2307103 525.1 ns/op 0 B/op 0 allocs/op
1251+
BenchmarkMatchString-8 127065 8553 ns/op 9975 B/op 86 allocs/op
1252+
BenchmarkMatchStringCompiled-8 2365681 507.5 ns/op 0 B/op 0 allocs/op
1253+
BenchmarkMatchStringGolibs-8 2357182 521.5 ns/op 0 B/op 0 allocs/op
12411254
PASS
1242-
ok _/Users/simonwaldherr/git/golang-benchmarks/regexp 4.800s
1255+
ok github.com/SimonWaldherr/golang-benchmarks/regexp 4.810s
12431256
```
12441257

go.mod

+13
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,16 @@ module github.com/SimonWaldherr/golang-benchmarks
22

33
go 1.18
44

5+
require (
6+
github.com/jzelinskie/whirlpool v0.0.0-20201016144138-0675e54bb004
7+
github.com/reusee/mmh3 v0.0.0-20140820141314-64b85163255b
8+
github.com/zeebo/blake3 v0.2.3
9+
golang.org/x/crypto v0.0.0-20220817201139-bc19a97f63c8
10+
)
11+
12+
require (
13+
github.com/klauspost/cpuid/v2 v2.0.12 // indirect
14+
golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 // indirect
15+
simonwaldherr.de/go/golibs v0.14.0 // indirect
16+
simonwaldherr.de/go/ranger v0.1.4 // indirect
17+
)

0 commit comments

Comments
 (0)