From abd32b18b5947774d8c47933a7a95dc2f58448ac Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Mon, 15 Apr 2024 09:47:00 -0700 Subject: [PATCH] consistency cleanup --- .swift-version | 2 +- Sources/scale-benchmark/main.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.swift-version b/.swift-version index 95ee81a4..3659ea2f 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -5.9 +5.8 diff --git a/Sources/scale-benchmark/main.swift b/Sources/scale-benchmark/main.swift index de79cfbe..2e0ea94a 100644 --- a/Sources/scale-benchmark/main.swift +++ b/Sources/scale-benchmark/main.swift @@ -36,14 +36,14 @@ import Benchmark public let addStringBenchmarks = BenchmarkSuite(name: "add string", settings: Iterations(10000)) { suite in suite.benchmark("no capacity") { - var x1: String = "" + var x1 = "" for _ in 1 ... 1000 { x1 += "hi" } } suite.benchmark("reserved capacity", settings: Iterations(10001)) { - var x2: String = "" + var x2 = "" x2.reserveCapacity(2000) for _ in 1 ... 1000 { x2 += "hi"