Skip to content

Commit c001de0

Browse files
committed
Broaden the set of benchmarks tagged under .cpubench
These have all shown to be interesting, relevant, stable, and optimized well enough by the compiler to be useful for cpu performance tracking.
1 parent 7e00f7e commit c001de0

8 files changed

+8
-8
lines changed

benchmark/single-source/DataBenchmarks.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import TestsUtils
1414
import Foundation
1515

16-
let d: [BenchmarkCategory] = [.validation, .api, .Data]
16+
let d: [BenchmarkCategory] = [.validation, .api, .Data, .cpubench]
1717

1818
public let DataBenchmarks = [
1919
BenchmarkInfo(name: "DataCreateEmpty",

benchmark/single-source/DictionarySwap.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let numberMap = Dictionary(uniqueKeysWithValues: zip(1...size, 1...size))
1919
let boxedNums = (1...size).lazy.map { Box($0) }
2020
let boxedNumMap = Dictionary(uniqueKeysWithValues: zip(boxedNums, boxedNums))
2121

22-
let t: [BenchmarkCategory] = [.validation, .api, .Dictionary]
22+
let t: [BenchmarkCategory] = [.validation, .api, .Dictionary, .cpubench]
2323

2424
public let DictionarySwap = [
2525
BenchmarkInfo(name: "DictionarySwap",

benchmark/single-source/NIOChannelPipeline.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import TestsUtils
1414

1515
// Mini benchmark implementing the gist of SwiftNIO's ChannelPipeline as
1616
// implemented by NIO 1 and NIO 2.[01]
17-
let t: [BenchmarkCategory] = [.runtime, .refcount]
17+
let t: [BenchmarkCategory] = [.runtime, .refcount, .cpubench]
1818
let N = 100
1919

2020
public let NIOChannelPipeline = [

benchmark/single-source/ObjectiveCNoBridgingStubs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Foundation
2121
import ObjectiveCTests
2222
#endif
2323

24-
let t: [BenchmarkCategory] = [.validation, .bridging]
24+
let t: [BenchmarkCategory] = [.validation, .bridging, .cpubench]
2525

2626
public let ObjectiveCNoBridgingStubs = [
2727
BenchmarkInfo(name: "ObjectiveCBridgeStubToNSStringRef",

benchmark/single-source/ReversedCollections.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public let ReversedCollections = [
1616
BenchmarkInfo(name: "ReversedArray2", runFunction: run_ReversedArray, tags: [.validation, .api, .Array],
1717
setUpFunction: { blackHole(arrayInput) },
1818
tearDownFunction: { arrayInput = nil }),
19-
BenchmarkInfo(name: "ReversedBidirectional", runFunction: run_ReversedBidirectional, tags: [.validation, .api]),
19+
BenchmarkInfo(name: "ReversedBidirectional", runFunction: run_ReversedBidirectional, tags: [.validation, .api, .cpubench]),
2020
BenchmarkInfo(name: "ReversedDictionary2", runFunction: run_ReversedDictionary, tags: [.validation, .api, .Dictionary],
2121
setUpFunction: { blackHole(dictionaryInput) },
2222
tearDownFunction: { dictionaryInput = nil })

benchmark/single-source/SortLargeExistentials.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import TestsUtils
1717
public let SortLargeExistentials = BenchmarkInfo(
1818
name: "SortLargeExistentials",
1919
runFunction: run_SortLargeExistentials,
20-
tags: [.validation, .api, .algorithm],
20+
tags: [.validation, .api, .algorithm, .cpubench],
2121
legacyFactor: 100)
2222

2323
protocol LetterKind {

benchmark/single-source/StackPromo.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import TestsUtils
1414
public let StackPromo = BenchmarkInfo(
1515
name: "StackPromo",
1616
runFunction: run_StackPromo,
17-
tags: [.regression],
17+
tags: [.regression, .cpubench],
1818
legacyFactor: 100)
1919

2020
protocol Proto {

benchmark/single-source/StringReplaceSubrange.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import TestsUtils
1414

15-
let tags: [BenchmarkCategory] = [.validation, .api, .String]
15+
let tags: [BenchmarkCategory] = [.validation, .api, .String, .cpubench]
1616

1717
public let StringReplaceSubrange = [
1818
BenchmarkInfo(

0 commit comments

Comments
 (0)