Skip to content

Commit ced9c53

Browse files
Optimise parsing by removing excessive copying. (#278)
* Optimise parsing by removing excessive copying. * Add benchmark --------- Co-authored-by: Joannis Orlandos <joannis@orlandos.nl>
1 parent c125e55 commit ced9c53

File tree

8 files changed

+1311
-27
lines changed

8 files changed

+1311
-27
lines changed

Benchmarks/.vscode/launch.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"configurations": [
3+
{
4+
"type": "lldb",
5+
"request": "launch",
6+
"sourceLanguages": [
7+
"swift"
8+
],
9+
"args": [],
10+
"cwd": "${workspaceFolder:Benchmarks}",
11+
"name": "Debug XMLCoderBenchmarks",
12+
"program": "${workspaceFolder:Benchmarks}/.build/debug/XMLCoderBenchmarks",
13+
"preLaunchTask": "swift: Build Debug XMLCoderBenchmarks"
14+
},
15+
{
16+
"type": "lldb",
17+
"request": "launch",
18+
"sourceLanguages": [
19+
"swift"
20+
],
21+
"args": [],
22+
"cwd": "${workspaceFolder:Benchmarks}",
23+
"name": "Release XMLCoderBenchmarks",
24+
"program": "${workspaceFolder:Benchmarks}/.build/release/XMLCoderBenchmarks",
25+
"preLaunchTask": "swift: Build Release XMLCoderBenchmarks"
26+
}
27+
]
28+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Benchmark
2+
3+
let benchmarks = {
4+
Benchmark(
5+
"XMLDecoder",
6+
configuration: .init(
7+
metrics: [
8+
.throughput
9+
]
10+
)
11+
) { benchmark in
12+
try runXMLDecoder()
13+
}
14+
}

0 commit comments

Comments
 (0)