Skip to content

Commit dbd7258

Browse files
authored
Merge pull request swiftlang#63716 from valeriyvan/Benchmark-UnsafeRawBufferPointer-first
[stdlib][benchmark] extend benchmark for `findFirst`/`findLast` of `UnsafeMutableRawBufferPointer` for 128 bytes buffer
2 parents 965c963 + bca183c commit dbd7258

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

benchmark/single-source/BufferFind.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ public var benchmarks: [BenchmarkInfo] = [
2828
setUpFunction: buffer1000Setup,
2929
tearDownFunction: bufferTeardown
3030
),
31+
// size 128, alignment 0
32+
BenchmarkInfo(
33+
name: "RawBuffer.128.findFirst",
34+
runFunction: run_BufferFindFirst,
35+
tags: [.validation, .api, .skip],
36+
setUpFunction: buffer128Setup,
37+
tearDownFunction: bufferTeardown
38+
),
39+
BenchmarkInfo(
40+
name: "RawBuffer.128.findLast",
41+
runFunction: run_BufferFindLast,
42+
tags: [.validation, .api],
43+
setUpFunction: buffer128Setup,
44+
tearDownFunction: bufferTeardown
45+
),
3146
// size 39, alignment 0
3247
BenchmarkInfo(
3348
name: "RawBuffer.39.findFirst",
@@ -66,6 +81,10 @@ func buffer1000Setup() {
6681
bufferSetup(size: 1000, alignment: 0)
6782
}
6883

84+
func buffer128Setup() {
85+
bufferSetup(size: 128, alignment: 0)
86+
}
87+
6988
func buffer39Setup() {
7089
bufferSetup(size: 39, alignment: 0)
7190
}

0 commit comments

Comments
 (0)