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 d70e330 commit 6ce5a96Copy full SHA for 6ce5a96
.swift-version
@@ -1 +1 @@
1
-5.9
+5.8
Sources/scale-benchmark/main.swift
@@ -36,14 +36,14 @@ import Benchmark
36
public let addStringBenchmarks = BenchmarkSuite(name: "add string", settings: Iterations(10000)) {
37
suite in
38
suite.benchmark("no capacity") {
39
- var x1: String = ""
+ var x1 = ""
40
for _ in 1 ... 1000 {
41
x1 += "hi"
42
}
43
44
45
suite.benchmark("reserved capacity", settings: Iterations(10001)) {
46
- var x2: String = ""
+ var x2 = ""
47
x2.reserveCapacity(2000)
48
49
x2 += "hi"
0 commit comments