@@ -43,7 +43,7 @@ If you\'re interested in new programming languages, you should definitely take a
43
43
44
44
## Benchmark Results
45
45
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 )
47
47
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 )
48
48
49
49
### base64
@@ -92,14 +92,15 @@ func BenchmarkBase64regex(b *testing.B) {
92
92
```
93
93
94
94
```
95
- $ go test -bench . -benchmem
95
+ $ go1.20rc1 test -bench . -benchmem
96
96
goos: darwin
97
97
goarch: amd64
98
+ pkg: github.com/SimonWaldherr/golang-benchmarks/base64
98
99
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
101
102
PASS
102
- ok _/Users/simonwaldherr/git/ golang-benchmarks/base64 2.916s
103
+ ok github.com/SimonWaldherr/ golang-benchmarks/base64 2.863s
103
104
```
104
105
105
106
### between
@@ -188,16 +189,17 @@ func BenchmarkFulltextParse(b *testing.B) {
188
189
```
189
190
190
191
```
191
- $ go test -bench . -benchmem
192
+ $ go1.20rc1 test -bench . -benchmem
192
193
goos: darwin
193
194
goarch: amd64
195
+ pkg: github.com/SimonWaldherr/golang-benchmarks/between
194
196
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
199
201
PASS
200
- ok _/Users/simonwaldherr/git/ golang-benchmarks/between 6.084s
202
+ ok github.com/SimonWaldherr/ golang-benchmarks/between 6.206s
201
203
```
202
204
203
205
### caseinsensitivecompare
@@ -236,15 +238,16 @@ func BenchmarkToLower(b *testing.B) {
236
238
```
237
239
238
240
```
239
- $ go test -bench . -benchmem
241
+ $ go1.20rc1 test -bench . -benchmem
240
242
goos: darwin
241
243
goarch: amd64
244
+ pkg: github.com/SimonWaldherr/golang-benchmarks/caseinsensitivecompare
242
245
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
246
249
PASS
247
- ok _/Users/simonwaldherr/git/ golang-benchmarks/caseinsensitivecompare 4.060s
250
+ ok github.com/SimonWaldherr/ golang-benchmarks/caseinsensitivecompare 4.941s
248
251
```
249
252
250
253
### concat
@@ -287,15 +290,16 @@ func BenchmarkConcatBuilder(b *testing.B) {
287
290
```
288
291
289
292
```
290
- $ go test -bench . -benchmem
293
+ $ go1.20rc1 test -bench . -benchmem
291
294
goos: darwin
292
295
goarch: amd64
296
+ pkg: github.com/SimonWaldherr/golang-benchmarks/concat
293
297
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
297
301
PASS
298
- ok _/Users/simonwaldherr/git/ golang-benchmarks/concat 56.377s
302
+ ok github.com/SimonWaldherr/ golang-benchmarks/concat 63.405s
299
303
```
300
304
301
305
### contains
@@ -442,20 +446,21 @@ func BenchmarkMatchNot(b *testing.B) {
442
446
```
443
447
444
448
```
445
- $ go test -bench . -benchmem
449
+ $ go1.20rc1 test -bench . -benchmem
446
450
goos: darwin
447
451
goarch: amd64
452
+ pkg: github.com/SimonWaldherr/golang-benchmarks/contains
448
453
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
457
462
PASS
458
- ok _/Users/simonwaldherr/git/ golang-benchmarks/contains 12.243s
463
+ ok github.com/SimonWaldherr/ golang-benchmarks/contains 12.566s
459
464
```
460
465
461
466
### foreach
@@ -539,16 +544,17 @@ func BenchmarkRangeSliceKey(b *testing.B) {
539
544
```
540
545
541
546
```
542
- $ go test -bench . -benchmem
547
+ $ go1.20rc1 test -bench . -benchmem
543
548
goos: darwin
544
549
goarch: amd64
550
+ pkg: github.com/SimonWaldherr/golang-benchmarks/foreach
545
551
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
550
556
PASS
551
- ok _/Users/simonwaldherr/git/ golang-benchmarks/foreach 5.721s
557
+ ok github.com/SimonWaldherr/ golang-benchmarks/foreach 5.860s
552
558
```
553
559
554
560
### hash
@@ -752,41 +758,42 @@ func BenchmarkSHA256Parallel(b *testing.B) {
752
758
```
753
759
754
760
```
755
- $ go test -bench . -benchmem
761
+ $ go1.20rc1 test -bench . -benchmem
756
762
goos: darwin
757
763
goarch: amd64
764
+ pkg: github.com/SimonWaldherr/golang-benchmarks/hash
758
765
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
788
795
PASS
789
- ok _/Users/simonwaldherr/git/ golang-benchmarks/hash 40.107s
796
+ ok github.com/SimonWaldherr/ golang-benchmarks/hash 40.820s
790
797
```
791
798
792
799
### index
@@ -866,14 +873,15 @@ func BenchmarkMapIntKeys(b *testing.B) {
866
873
```
867
874
868
875
```
869
- $ go test -bench . -benchmem
876
+ $ go1.20rc1 test -bench . -benchmem
870
877
goos: darwin
871
878
goarch: amd64
879
+ pkg: github.com/SimonWaldherr/golang-benchmarks/index
872
880
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
875
883
PASS
876
- ok _/Users/simonwaldherr/git/ golang-benchmarks/index 3.841s
884
+ ok github.com/SimonWaldherr/ golang-benchmarks/index 4.191s
877
885
```
878
886
879
887
### json
@@ -961,14 +969,15 @@ func BenchmarkJsonUnmarshal(b *testing.B) {
961
969
```
962
970
963
971
```
964
- $ go test -bench . -benchmem
972
+ $ go1.20rc1 test -bench . -benchmem
965
973
goos: darwin
966
974
goarch: amd64
975
+ pkg: github.com/SimonWaldherr/golang-benchmarks/json
967
976
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
970
979
PASS
971
- ok _/Users/simonwaldherr/git/ golang-benchmarks/json 2.576s
980
+ ok github.com/SimonWaldherr/ golang-benchmarks/json 3.630s
972
981
```
973
982
974
983
### math
@@ -1048,20 +1057,21 @@ func BenchmarkMathFloat64(b *testing.B) {
1048
1057
```
1049
1058
1050
1059
```
1051
- $ go test -bench . -benchmem
1060
+ $ go1.20rc1 test -bench . -benchmem
1052
1061
goos: darwin
1053
1062
goarch: amd64
1063
+ pkg: github.com/SimonWaldherr/golang-benchmarks/math
1054
1064
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
1063
1073
PASS
1064
- ok _/Users/simonwaldherr/git/ golang-benchmarks/math 6.438s
1074
+ ok github.com/SimonWaldherr/ golang-benchmarks/math 6.457s
1065
1075
```
1066
1076
1067
1077
### parse
@@ -1104,15 +1114,16 @@ func BenchmarkParseFloat(b *testing.B) {
1104
1114
```
1105
1115
1106
1116
```
1107
- $ go test -bench . -benchmem
1117
+ $ go1.20rc1 test -bench . -benchmem
1108
1118
goos: darwin
1109
1119
goarch: amd64
1120
+ pkg: github.com/SimonWaldherr/golang-benchmarks/parse
1110
1121
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
1114
1125
PASS
1115
- ok _/Users/simonwaldherr/git/ golang-benchmarks/parse 3.233s
1126
+ ok github.com/SimonWaldherr/ golang-benchmarks/parse 3.365s
1116
1127
```
1117
1128
1118
1129
### random
@@ -1172,15 +1183,16 @@ func GenerateRandomString(s int) (string, error) {
1172
1183
```
1173
1184
1174
1185
```
1175
- $ go test -bench . -benchmem
1186
+ $ go1.20rc1 test -bench . -benchmem
1176
1187
goos: darwin
1177
1188
goarch: amd64
1189
+ pkg: github.com/SimonWaldherr/golang-benchmarks/random
1178
1190
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
1182
1194
PASS
1183
- ok _/Users/simonwaldherr/git/ golang-benchmarks/random 3.826s
1195
+ ok github.com/SimonWaldherr/ golang-benchmarks/random 3.768s
1184
1196
```
1185
1197
1186
1198
### regexp
@@ -1231,14 +1243,15 @@ func BenchmarkMatchStringGolibs(b *testing.B) {
1231
1243
```
1232
1244
1233
1245
```
1234
- $ go test -bench . -benchmem
1246
+ $ go1.20rc1 test -bench . -benchmem
1235
1247
goos: darwin
1236
1248
goarch: amd64
1249
+ pkg: github.com/SimonWaldherr/golang-benchmarks/regexp
1237
1250
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
1241
1254
PASS
1242
- ok _/Users/simonwaldherr/git/ golang-benchmarks/regexp 4.800s
1255
+ ok github.com/SimonWaldherr/ golang-benchmarks/regexp 4.810s
1243
1256
```
1244
1257
0 commit comments