ywxzm03 commented on PR #3399:
URL: https://github.com/apache/dubbo-go/pull/3399#issuecomment-4691109732
上面那个基准测试结果是main的,搞错了,这是develop的:
```
goos: darwin
goarch: arm64
pkg: dubbo.apache.org/dubbo-go/v3/common
cpu: Apple M5
BenchmarkURLString/params_1-10 3026236 383.2
ns/op 728 B/op 13 allocs/op
BenchmarkURLString/params_32-10 698642 1651
ns/op 3385 B/op 16 allocs/op
BenchmarkURLString/params_256-10 66152 18138
ns/op 21698 B/op 20 allocs/op
BenchmarkURLString/params_1024-10 13412 95501
ns/op 98025 B/op 25 allocs/op
BenchmarkURLKey/params_1-10 6306699 185.7
ns/op 192 B/op 7 allocs/op
BenchmarkURLKey/params_32-10 6529956 193.3
ns/op 192 B/op 7 allocs/op
BenchmarkURLKey/params_256-10 6662924 182.5
ns/op 192 B/op 7 allocs/op
BenchmarkURLKey/params_1024-10 6467244 182.7
ns/op 192 B/op 7 allocs/op
BenchmarkURLGetCacheInvokerMapKey/params_1-10 5027041
233.0 ns/op 272 B/op 9 allocs/op
BenchmarkURLGetCacheInvokerMapKey/params_32-10 5069215
258.9 ns/op 272 B/op 9 allocs/op
BenchmarkURLGetCacheInvokerMapKey/params_256-10 5124664
237.1 ns/op 272 B/op 9 allocs/op
BenchmarkURLGetCacheInvokerMapKey/params_1024-10 5019613
237.3 ns/op 272 B/op 9 allocs/op
BenchmarkURLServiceKey/params_1-10 21817784
63.51 ns/op 112 B/op 2 allocs/op
BenchmarkURLServiceKey/params_32-10 21063440
54.99 ns/op 112 B/op 2 allocs/op
BenchmarkURLServiceKey/params_256-10 21789426
56.49 ns/op 112 B/op 2 allocs/op
BenchmarkURLServiceKey/params_1024-10 21540874
60.97 ns/op 112 B/op 2 allocs/op
BenchmarkURLCopyParams/params_1-10 6203845
206.8 ns/op 496 B/op 8 allocs/op
BenchmarkURLCopyParams/params_32-10 1000000
1107 ns/op 3368 B/op 41 allocs/op
BenchmarkURLCopyParams/params_256-10 163902
7490 ns/op 26024 B/op 265 allocs/op
BenchmarkURLCopyParams/params_1024-10 34876
31195 ns/op 114896 B/op 1035 allocs/op
BenchmarkURLGetParams/params_1-10 6623463
180.1 ns/op 496 B/op 8 allocs/op
BenchmarkURLGetParams/params_32-10 1000000
1058 ns/op 3368 B/op 41 allocs/op
BenchmarkURLGetParams/params_256-10 168154
7291 ns/op 26024 B/op 265 allocs/op
BenchmarkURLGetParams/params_1024-10 39310
30801 ns/op 114896 B/op 1035 allocs/op
BenchmarkURLClone/params_1-10 4174020
282.7 ns/op 832 B/op 11 allocs/op
BenchmarkURLClone/params_32-10 544749
2177 ns/op 6232 B/op 49 allocs/op
BenchmarkURLClone/params_256-10 73340
16474 ns/op 47928 B/op 279 allocs/op
BenchmarkURLClone/params_1024-10 18205
65924 ns/op 207784 B/op 1054 allocs/op
BenchmarkURLClone/params_1_with_suburl-10 2078948
571.2 ns/op 1664 B/op 22 allocs/op
BenchmarkURLClone/params_32_with_suburl-10 269206
4404 ns/op 12464 B/op 98 allocs/op
BenchmarkURLClone/params_256_with_suburl-10 36600
32677 ns/op 95856 B/op 558 allocs/op
BenchmarkURLClone/params_1024_with_suburl-10 8144
156119 ns/op 415568 B/op 2108 allocs/op
BenchmarkURLCloneWithFilter/params_1-10 4061169
315.3 ns/op 832 B/op 11 allocs/op
BenchmarkURLCloneWithFilter/params_32-10 540829
2186 ns/op 6232 B/op 49 allocs/op
BenchmarkURLCloneWithFilter/params_256-10 74157
16173 ns/op 47928 B/op 279 allocs/op
BenchmarkURLCloneWithFilter/params_1024-10 18078
65462 ns/op 207784 B/op 1054 allocs/op
BenchmarkURLCloneWithFilter/params_1_exclude_20_percent-10
3939213 312.7 ns/op 816 B/op 10 allocs/op
BenchmarkURLCloneWithFilter/params_32_exclude_20_percent-10
437833 2467 ns/op 6120 B/op 42 allocs/op
BenchmarkURLCloneWithFilter/params_256_exclude_20_percent-10
84950 14719 ns/op 25304 B/op 225 allocs/op
BenchmarkURLCloneWithFilter/params_1024_exclude_20_percent-10
20248 58591 ns/op 106120 B/op 844 allocs/op
BenchmarkURLCloneWithFilter/params_1_exclude_20_percent_with_suburl-10
1907947 606.4 ns/op 1648 B/op 21 allocs/op
BenchmarkURLCloneWithFilter/params_32_exclude_20_percent_with_suburl-10
264130 4534 ns/op 12352 B/op 91 allocs/op
BenchmarkURLCloneWithFilter/params_256_exclude_20_percent_with_suburl-10
38130 30610 ns/op 73232 B/op 504 allocs/op
BenchmarkURLCloneWithFilter/params_1024_exclude_20_percent_with_suburl-10
9326 130434 ns/op 313904 B/op 1898 allocs/op
BenchmarkURLCloneWithFilter/params_1_reserve_20_percent-10
6084813 220.9 ns/op 752 B/op 6 allocs/op
BenchmarkURLCloneWithFilter/params_32_reserve_20_percent-10
1917904 632.5 ns/op 848 B/op 12 allocs/op
BenchmarkURLCloneWithFilter/params_256_reserve_20_percent-10
100050 13070 ns/op 6472 B/op 64 allocs/op
BenchmarkURLCloneWithFilter/params_1024_reserve_20_percent-10
6087 183739 ns/op 25240 B/op 221 allocs/op
BenchmarkURLCloneWithFilter/params_1_reserve_20_percent_with_suburl-10
2495181 699.4 ns/op 1584 B/op 17 allocs/op
BenchmarkURLCloneWithFilter/params_32_reserve_20_percent_with_suburl-10
394444 3245 ns/op 7080 B/op 61 allocs/op
BenchmarkURLCloneWithFilter/params_256_reserve_20_percent_with_suburl-10
40737 34839 ns/op 54400 B/op 343 allocs/op
BenchmarkURLCloneWithFilter/params_1024_reserve_20_percent_with_suburl-10
4531 264162 ns/op 233024 B/op 1275 allocs/op
BenchmarkURLMergeURL/params_1_with_method_params-10
336252 3462 ns/op 6360 B/op 103 allocs/op
BenchmarkURLMergeURL/params_32_with_method_params-10
118677 10057 ns/op 19888 B/op 218 allocs/op
BenchmarkURLMergeURL/params_256_with_method_params-10
24115 46353 ns/op 103280 B/op 1006 allocs/op
BenchmarkURLMergeURL/params_1024_with_method_params-10
6734 180407 ns/op 447025 B/op 3705 allocs/op
BenchmarkURLToMap/params_1-10
3374077 479.2 ns/op 1016 B/op 7 allocs/op
BenchmarkURLToMap/params_32-10
677581 2499 ns/op 4536 B/op 11 allocs/op
BenchmarkURLToMap/params_256-10
68665 19297 ns/op 37400 B/op 17 allocs/op
BenchmarkURLToMap/params_1024-10
18144 66803 ns/op 160392 B/op 24 allocs/op
BenchmarkURLIsEquals/params_1-10
993952 1174 ns/op 2032 B/op 14 allocs/op
BenchmarkURLIsEquals/params_32-10
222820 5310 ns/op 9072 B/op 22 allocs/op
BenchmarkURLIsEquals/params_256-10
31465 37645 ns/op 74800 B/op 34 allocs/op
BenchmarkURLIsEquals/params_1024-10
7587 155206 ns/op 320784 B/op 48 allocs/op
PASS
ok dubbo.apache.org/dubbo-go/v3/common 95.390s
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]