Skip to content

Commit ea89c5c

Browse files
committed
fixup! benchmarks with StringBuilder and String.plus similar to string interpolation benchmark
1 parent 051068c commit ea89c5c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/commonMain/kotlin/microBenchmarks/StringBenchmark.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,7 @@ class StringBenchmark {
178178
j = (j + 1) and 15
179179
val add3 = stringsInterpolation[j]
180180
j = (j + 1) and 15
181-
var string = add1
182-
string = string.plus(add2)
183-
string = string.plus(add3)
181+
val string = add1 + add2 + add3
184182
sum += string.length
185183
i++
186184
}

0 commit comments

Comments
 (0)