We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 914ade4 commit 005ffc0Copy full SHA for 005ffc0
slicetostring_benchmark_test.go
@@ -39,9 +39,17 @@ func BenchmarkSliceStandard10MixedItems(b *testing.B) {
39
func BenchmarkSliceToStringAdvanced20StrItems(b *testing.B) {
40
slice := []any{"str1", "str2", "str3", "str4", "str5", "str6", "str7", "str8", "str9", "str10",
41
"str11", "str12", "str13", "str14", "str15", "str16", "str17", "str18", "str19", "str20"}
42
+ for i := 0; i < b.N; i++ {
43
+ _ = stringFormatter.Format("{0:L,}", []any{slice})
44
+ }
45
+}
46
+
47
+func BenchmarkSliceToStringAdvanced20TypedStrItems(b *testing.B) {
48
+ slice := []string{"str1", "str2", "str3", "str4", "str5", "str6", "str7", "str8", "str9", "str10",
49
+ "str11", "str12", "str13", "str14", "str15", "str16", "str17", "str18", "str19", "str20"}
50
separator := ","
51
for i := 0; i < b.N; i++ {
- _ = stringFormatter.SliceToString(&slice, &separator)
52
+ _ = stringFormatter.SliceSameTypeToString(&slice, &separator)
53
}
54
55
0 commit comments