Fetching https://github.com/google/swift-benchmark
Fetching https://github.com/swiftlang/swift-syntax.git
[1/1490] Fetching swift-benchmark
[1491/74707] Fetching swift-benchmark, swift-syntax
Fetched https://github.com/google/swift-benchmark from cache (3.33s)
Fetched https://github.com/swiftlang/swift-syntax.git from cache (3.33s)
Fetching https://github.com/swiftlang/swift-docc-plugin
[1/2158] Fetching swift-docc-plugin
Fetched https://github.com/swiftlang/swift-docc-plugin from cache (0.57s)
Computing version for https://github.com/google/swift-benchmark
Computed https://github.com/google/swift-benchmark at 0.1.2 (6.41s)
Fetching https://github.com/apple/swift-argument-parser
[1/16987] Fetching swift-argument-parser
Fetched https://github.com/apple/swift-argument-parser from cache (0.77s)
Computed https://github.com/google/swift-benchmark at 0.1.2 (0.79s)
Computing version for https://github.com/swiftlang/swift-docc-plugin
Computed https://github.com/swiftlang/swift-docc-plugin at 1.4.5 (0.32s)
Fetching https://github.com/swiftlang/swift-docc-symbolkit
[1/3630] Fetching swift-docc-symbolkit
Fetched https://github.com/swiftlang/swift-docc-symbolkit from cache (0.66s)
Computed https://github.com/swiftlang/swift-docc-plugin at 1.4.5 (0.67s)
Computing version for https://github.com/swiftlang/swift-docc-symbolkit
Computed https://github.com/swiftlang/swift-docc-symbolkit at 1.0.0 (0.35s)
Computing version for https://github.com/swiftlang/swift-syntax.git
Computed https://github.com/swiftlang/swift-syntax.git at 602.0.0 (0.37s)
Computed https://github.com/swiftlang/swift-syntax.git at 602.0.0 (0.00s)
Computing version for https://github.com/apple/swift-argument-parser
Computed https://github.com/apple/swift-argument-parser at 1.7.0 (0.23s)
Creating working copy for https://github.com/swiftlang/swift-docc-symbolkit
Working copy of https://github.com/swiftlang/swift-docc-symbolkit resolved at 1.0.0
Creating working copy for https://github.com/apple/swift-argument-parser
Working copy of https://github.com/apple/swift-argument-parser resolved at 1.7.0
Creating working copy for https://github.com/swiftlang/swift-docc-plugin
Working copy of https://github.com/swiftlang/swift-docc-plugin resolved at 1.4.5
Creating working copy for https://github.com/google/swift-benchmark
Working copy of https://github.com/google/swift-benchmark resolved at 0.1.2
Creating working copy for https://github.com/swiftlang/swift-syntax.git
Working copy of https://github.com/swiftlang/swift-syntax.git resolved at 602.0.0
Downloading package prebuilt https://download.swift.org/prebuilts/swift-syntax/602.0.0/swiftlang-6.2.1.4.8-MacroSupport-macos_aarch64.zip
Downloaded https://download.swift.org/prebuilts/swift-syntax/602.0.0/swiftlang-6.2.1.4.8-MacroSupport-macos_aarch64.zip (0.08s)
Building for production...
[0/11] Write sources
[6/11] Write swift-version--3A98693DF01E6000.txt
[8/13] Compiling ArgumentParserToolInfo ToolInfo.swift
[9/13] Compiling CSVCoderMacros CSVIndexedMacro.swift
[9/13] Write Objects.LinkFileList
[10/14] Linking CSVCoderMacros-tool
[12/15] Compiling CSVCoder CSVDecoder.swift
[13/15] Compiling ArgumentParser BashCompletionsGenerator.swift
[14/16] Compiling Benchmark Benchmark.swift
[15/17] Compiling CSVCoderBenchmarks HardwareInfo.swift
[15/17] Write Objects.LinkFileList
[16/17] Linking CSVCoderBenchmarks
Build of product 'CSVCoderBenchmarks' complete! (19.62s)
running Raw Parse 1M rows (Iterate Only)... done! (5097.65 ms)
running Raw Parse 1M rows (Iterate + String)... done! (5375.42 ms)
running Raw Parse 100K Quoted Rows (Iterate Only)... done! (396.02 ms)
running Raw Parse 100K Quoted Rows (Iterate + String)... done! (482.26 ms)
running Decode 1K rows (simple)... done! (10.39 ms)
running Decode 10K rows (simple)... done! (102.78 ms)
running Decode 100K rows (simple)... done! (1052.93 ms)
running Decode 1M rows (simple)... done! (10556.57 ms)
running Decode 10K rows (complex, 8 fields)... done! (231.90 ms)
running Decode 100K rows (complex, 8 fields)... done! (2281.54 ms)
running Decode 10K rows (quoted fields)... done! (99.55 ms)
running Decode 10K rows (50 columns wide)... done! (785.26 ms)
running Decode 10K rows (500-byte fields)... done! (324.44 ms)
running Decode 100K rows (numeric fields)... done! (1039.92 ms)
running Decode 50K orders (18 fields, optionals)... done! (2339.84 ms)
running Decode 100K transactions (13 fields)... done! (3531.90 ms)
running Decode 100K log entries (12 fields)... done! (3465.03 ms)
running Decode 10K stress-quoted (nested quotes, newlines)... done! (83.86 ms)
running Decode 50K Unicode-heavy rows... done! (522.78 ms)
running Decode 1K rows (10KB fields)... done! (530.50 ms)
running Decode 1K rows (200 columns wide)... done! (265.49 ms)
running Encode 1K rows... done! (6.06 ms)
running Encode 10K rows... done! (50.39 ms)
running Encode 100K rows... done! (510.62 ms)
running Encode 1M rows... done! (5390.00 ms)
running Encode 10K rows (quoted fields)... done! (53.76 ms)
running Encode 10K rows (500-byte fields)... done! (310.72 ms)
running Encode 50K orders (18 fields, optionals)... done! (970.48 ms)
running Encode 100K rows to Data... done! (536.58 ms)
running Encode 100K rows to String... done! (542.58 ms)
running Decode 1K rows with snake_case conversion... done! (12.48 ms)
running Decode 1K rows with flexible date parsing... done! (502.00 ms)
running Decode 1K rows with flexible number parsing... done! (682.79 ms)
running Decode 100K rows (sequential, p=1)... done! (2341.93 ms)
running Decode 100K rows (parallel, p=all)... done! (1662.34 ms)
running Decode 1M rows (parallel, p=all)... done! (41335.73 ms)
running Encode 100K rows (sequential, p=1)... done! (759.26 ms)
running Encode 100K rows (parallel, p=all)... done! (327.25 ms)
running Encode 1M rows (parallel, p=all)... done! (3522.51 ms)
running Decode 100K from file (parallel)... done! (1855.56 ms)
running Encode 100K to file (parallel)... done! (368.43 ms)
running Mixed: Decode + Transform + Encode 10K... done! (160.28 ms)
running Mixed: Filter + Aggregate 100K orders... done! (2273.86 ms)
════════════════════════════════════════════════════════════════════════
CSVCoder Benchmark Suite
════════════════════════════════════════════════════════════════════════
Hardware:
CPU: Apple M1 (Virtual)
Cores: 3 total (3P + 0E)
Memory: 7 GB
Software:
OS: Version 15.7.2 (Build 24G325)
Swift: 6.2+
Build: Release
════════════════════════════════════════════════════════════════════════
name time std iterations
-------------------------------------------------------------------------------------------
Raw Parse 1M rows (Iterate Only) 1722206083.000 ns ± 2.37 % 3
Raw Parse 1M rows (Iterate + String) 1806271917.000 ns ± 1.49 % 3
Raw Parse 100K Quoted Rows (Iterate Only) 131071083.000 ns ± 1.37 % 3
Raw Parse 100K Quoted Rows (Iterate + String) 160394084.000 ns ± 0.59 % 3
Decode 1K rows (simple) 3335834.000 ns ± 6.97 % 3
Decode 10K rows (simple) 34202709.000 ns ± 0.50 % 3
Decode 100K rows (simple) 350404833.000 ns ± 0.86 % 3
Decode 1M rows (simple) 3467300250.000 ns ± 2.68 % 3
Decode 10K rows (complex, 8 fields) 77264750.000 ns ± 2.98 % 3
Decode 100K rows (complex, 8 fields) 760426125.000 ns ± 0.05 % 3
Decode 10K rows (quoted fields) 32614625.000 ns ± 3.07 % 3
Decode 10K rows (50 columns wide) 261632500.000 ns ± 0.39 % 3
Decode 10K rows (500-byte fields) 108481417.000 ns ± 1.14 % 3
Decode 100K rows (numeric fields) 346016792.000 ns ± 0.71 % 3
Decode 50K orders (18 fields, optionals) 781757709.000 ns ± 2.59 % 3
Decode 100K transactions (13 fields) 1158717167.000 ns ± 2.95 % 3
Decode 100K log entries (12 fields) 1177422000.000 ns ± 3.64 % 3
Decode 10K stress-quoted (nested quotes, newlines) 27294958.000 ns ± 6.36 % 3
Decode 50K Unicode-heavy rows 171856958.000 ns ± 6.08 % 3
Decode 1K rows (10KB fields) 177617666.000 ns ± 6.43 % 3
Decode 1K rows (200 columns wide) 88222333.000 ns ± 0.61 % 3
Encode 1K rows 1679834.000 ns ± 36.04 % 3
Encode 10K rows 16669875.000 ns ± 2.35 % 3
Encode 100K rows 167590333.000 ns ± 4.80 % 3
Encode 1M rows 1792737084.000 ns ± 0.41 % 3
Encode 10K rows (quoted fields) 17859417.000 ns ± 0.80 % 3
Encode 10K rows (500-byte fields) 103392334.000 ns ± 1.46 % 3
Encode 50K orders (18 fields, optionals) 326040292.000 ns ± 1.66 % 3
Encode 100K rows to Data 175313000.000 ns ± 3.66 % 3
Encode 100K rows to String 177704709.000 ns ± 3.91 % 3
Decode 1K rows with snake_case conversion 3798625.000 ns ± 19.09 % 3
Decode 1K rows with flexible date parsing 166837375.000 ns ± 2.34 % 3
Decode 1K rows with flexible number parsing 208181125.000 ns ± 17.36 % 3
Decode 100K rows (sequential, p=1) 782027958.000 ns ± 0.92 % 3
Decode 100K rows (parallel, p=all) 550259792.000 ns ± 2.25 % 3
Decode 1M rows (parallel, p=all) 13614966666.000 ns ± 2.41 % 3
Encode 100K rows (sequential, p=1) 217045084.000 ns ± 35.53 % 3
Encode 100K rows (parallel, p=all) 110006959.000 ns ± 16.13 % 3
Encode 1M rows (parallel, p=all) 1151391166.000 ns ± 3.55 % 3
Decode 100K from file (parallel) 630109375.000 ns ± 3.37 % 3
Encode 100K to file (parallel) 124571166.000 ns ± 2.96 % 3
Mixed: Decode + Transform + Encode 10K 53696292.000 ns ± 1.22 % 3
Mixed: Filter + Aggregate 100K orders 759877958.000 ns ± 4.01 % 3