Skip to content

Releases: g-cqd/CSVCoder

CSVCoder 0.0.4

01 Jan 04:33
5f936d8

Choose a tag to compare

CSVCoder 0.0.4

Other Changes

  • refactor: deduplicate code, remove unused code, improve CI/CD (5f936d8)

Benchmark Results

Click to expand benchmark results
[0/1] Planning build
Building for production...
[0/2] Write swift-version--3A98693DF01E6000.txt
[1/5] Write sources
[4/6] Compiling CSVCoderMacros CSVIndexedMacro.swift
[5/6] Compiling CSVCoder CSVDecoder.swift
[5/8] Write sources
[8/9] Compiling CSVCoderTestFixtures TestModels.swift
[9/10] Compiling CSVCoderBenchmarks HardwareInfo.swift
Build of product 'CSVCoderBenchmarks' complete! (10.19s)
running Raw Parse 1M rows (Iterate Only)... done! (5625.67 ms)
running Raw Parse 1M rows (Iterate + String)... done! (6060.75 ms)
running Raw Parse 100K Quoted Rows (Iterate Only)... done! (450.64 ms)
running Raw Parse 100K Quoted Rows (Iterate + String)... done! (530.52 ms)
running Decode 1K rows (simple)... done! (12.03 ms)
running Decode 10K rows (simple)... done! (114.11 ms)
running Decode 100K rows (simple)... done! (1188.34 ms)
running Decode 1M rows (simple)... done! (12385.73 ms)
running Decode 10K rows (complex, 8 fields)... done! (303.27 ms)
running Decode 100K rows (complex, 8 fields)... done! (2736.97 ms)
running Decode 10K rows (quoted fields)... done! (105.92 ms)
running Decode 10K rows (50 columns wide)... done! (844.05 ms)
running Decode 10K rows (500-byte fields)... done! (340.99 ms)
running Decode 100K rows (numeric fields)... done! (1124.77 ms)
running Decode 50K orders (18 fields, optionals)... done! (2476.56 ms)
running Decode 100K transactions (13 fields)... done! (3845.81 ms)
running Decode 100K log entries (12 fields)... done! (4080.83 ms)
running Decode 10K stress-quoted (nested quotes, newlines)... done! (108.42 ms)
running Decode 50K Unicode-heavy rows... done! (603.47 ms)
running Decode 1K rows (10KB fields)... done! (766.73 ms)
running Decode 1K rows (200 columns wide)... done! (327.91 ms)
running Encode 1K rows... done! (8.28 ms)
running Encode 10K rows... done! (67.73 ms)
running Encode 100K rows... done! (708.67 ms)
running Encode 1M rows... done! (6341.55 ms)
running Encode 10K rows (quoted fields)... done! (55.74 ms)
running Encode 10K rows (500-byte fields)... done! (315.32 ms)
running Encode 50K orders (18 fields, optionals)... done! (1000.83 ms)
running Encode 100K rows to Data... done! (613.38 ms)
running Encode 100K rows to String... done! (591.36 ms)
running Decode 1K rows with snake_case conversion... done! (12.55 ms)
running Decode 1K rows with flexible date parsing... done! (536.99 ms)
running Decode 1K rows with flexible number parsing... done! (700.49 ms)
running Decode 100K rows (sequential, p=1)... done! (2550.62 ms)
running Decode 100K rows (parallel, p=all)... done! (2050.15 ms)
running Decode 1M rows (parallel, p=all)... done! (42485.14 ms)
running Encode 100K rows (sequential, p=1)... done! (571.42 ms)
running Encode 100K rows (parallel, p=all)... done! (246.71 ms)
running Encode 1M rows (parallel, p=all)... done! (2522.13 ms)
running Decode 100K from file (parallel)... done! (2487.10 ms)
running Encode 100K to file (parallel)... done! (486.89 ms)
running Mixed: Decode + Transform + Encode 10K... done! (182.87 ms)
running Mixed: Filter + Aggregate 100K orders... done! (2613.24 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)                    1888373041.000 ns ±   2.43 %          3
Raw Parse 1M rows (Iterate + String)                2033232792.000 ns ±   3.14 %          3
Raw Parse 100K Quoted Rows (Iterate Only)            146072084.000 ns ±   4.96 %          3
Raw Parse 100K Quoted Rows (Iterate + String)        170585667.000 ns ±   6.62 %          3
Decode 1K rows (simple)                                3713167.000 ns ±  14.36 %          3
Decode 10K rows (simple)                              37930041.000 ns ±   0.50 %          3
Decode 100K rows (simple)                            388280500.000 ns ±   4.29 %          3
Decode 1M rows (simple)                             4109932541.000 ns ±   2.64 %          3
Decode 10K rows (complex, 8 fields)                  100891000.000 ns ±  10.48 %          3
Decode 100K rows (complex, 8 fields)                 896302709.000 ns ±   3.64 %          3
Decode 10K rows (quoted fields)                       35414875.000 ns ±   0.58 %          3
Decode 10K rows (50 columns wide)                    284072584.000 ns ±   2.33 %          3
Decode 10K rows (500-byte fields)                    113264542.000 ns ±   0.77 %          3
Decode 100K rows (numeric fields)                    371084208.000 ns ±   1.88 %          3
Decode 50K orders (18 fields, optionals)             826619084.000 ns ±   1.62 %          3
Decode 100K transactions (13 fields)                1250223042.000 ns ±   4.73 %          3
Decode 100K log entries (12 fields)                 1227192500.000 ns ±  21.33 %          3
Decode 10K stress-quoted (nested quotes, newlines)    35378125.000 ns ±   4.02 %          3
Decode 50K Unicode-heavy rows                        187145416.000 ns ±  17.71 %          3
Decode 1K rows (10KB fields)                         268664750.000 ns ±  14.28 %          3
Decode 1K rows (200 columns wide)                    110969708.000 ns ±   6.68 %          3
Encode 1K rows                                         2389750.000 ns ±  46.66 %          3
Encode 10K rows                                       19455083.000 ns ±  30.30 %          3
Encode 100K rows                                     252983625.000 ns ±  12.18 %          3
Encode 1M rows                                      2000760083.000 ns ±  12.14 %          3
Encode 10K rows (quoted fields)                       18305708.000 ns ±   3.01 %          3
Encode 10K rows (500-byte fields)                    104931042.000 ns ±   1.08 %          3
Encode 50K orders (18 fields, optionals)             330624333.000 ns ±   2.17 %          3
Encode 100K rows to Data                             193927333.000 ns ±  10.73 %          3
Encode 100K rows to String                           194850041.000 ns ±   4.41 %          3
Decode 1K rows with snake_case conversion              3871292.000 ns ±  14.80 %          3
Decode 1K rows with flexible date parsing            180241250.000 ns ±   1.85 %          3
Decode 1K rows with flexible number parsing          216465375.000 ns ±  17.98 %          3
Decode 100K rows (sequential, p=1)                   861428209.000 ns ±   3.49 %          3
Decode 100K rows (parallel, p=all)                   710027750.000 ns ±   7.05 %          3
Decode 1M rows (parallel, p=all)                   14221885750.000 ns ±   1.33 %          3
Encode 100K rows (sequential, p=1)                   188691792.000 ns ±   2.47 %          3
Encode 100K rows (parallel, p=all)                    82414000.000 ns ±   0.45 %          3
Encode 1M rows (parallel, p=all)                     838160666.000 ns ±   2.77 %          3
Decode 100K from file (parallel)                     769300667.000 ns ±  20.14 %          3
Encode 100K to file (parallel)                       157407458.000 ns ±   9.65 %          3
Mixed: Decode + Transform + Encode 10K                61664417.000 ns ±   3.71 %          3
Mixed: Filter + Aggregate 100K orders                848897250.000 ns ±   5.85 %          3

Installation

Swift Package Manager:

dependencies: [
    .package(url: "https://github.com/g-cqd/CSVCoder.git", from: "0.0.4")
]

CSVCoder v0.0.3

29 Dec 11:50
996b926

Choose a tag to compare

CSVCoder v0.0.3

What's Changed in v0.0.3

Features

Bug Fixes

Performance

Other Changes

  • chore: harmonize lint/format rules and auto-fix
  • chore: align SwiftFormat config with SwiftLint

Commits

  • 996b926 chore: harmonize lint/format rules and auto-fix (Gigi)
  • 7a869ec chore: align SwiftFormat config with SwiftLint (Gigi)

Benchmark Results

Click to expand benchmark results
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 ±...
Read more

CSVCoder v0.0.2

29 Dec 11:33
722aa9f

Choose a tag to compare

CSVCoder v0.0.2

What's Changed in v0.0.2

Features

Bug Fixes

Performance

Other Changes

  • Remove development artifacts and add test improvements

Commits

  • 722aa9f Remove development artifacts and add test improvements (Gigi)

Benchmark Results

Click to expand benchmark results
Fetching https://github.com/swiftlang/swift-docc-plugin
Fetching https://github.com/google/swift-benchmark
[1/2158] Fetching swift-docc-plugin
[23/3648] Fetching swift-docc-plugin, swift-benchmark
Fetched https://github.com/google/swift-benchmark from cache (1.01s)
Fetching https://github.com/swiftlang/swift-syntax.git
[238/2158] Fetching swift-docc-plugin
Fetched https://github.com/swiftlang/swift-docc-plugin from cache (1.26s)
[1/73217] Fetching swift-syntax
Fetched https://github.com/swiftlang/swift-syntax.git from cache (5.59s)
Computing version for https://github.com/google/swift-benchmark
Computed https://github.com/google/swift-benchmark at 0.1.2 (11.70s)
Fetching https://github.com/apple/swift-argument-parser
[1/16987] Fetching swift-argument-parser
Fetched https://github.com/apple/swift-argument-parser from cache (1.58s)
Computed https://github.com/google/swift-benchmark at 0.1.2 (1.60s)
Computing version for https://github.com/swiftlang/swift-docc-plugin
Computed https://github.com/swiftlang/swift-docc-plugin at 1.4.5 (0.36s)
Fetching https://github.com/swiftlang/swift-docc-symbolkit
[1/3630] Fetching swift-docc-symbolkit
Fetched https://github.com/swiftlang/swift-docc-symbolkit from cache (1.21s)
Computed https://github.com/swiftlang/swift-docc-plugin at 1.4.5 (1.23s)
Computing version for https://github.com/swiftlang/swift-docc-symbolkit
Computed https://github.com/swiftlang/swift-docc-symbolkit at 1.0.0 (0.40s)
Computing version for https://github.com/swiftlang/swift-syntax.git
Computed https://github.com/swiftlang/swift-syntax.git at 602.0.0 (0.45s)
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.28s)
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/swiftlang/swift-syntax.git
Working copy of https://github.com/swiftlang/swift-syntax.git resolved at 602.0.0
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/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
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.76s)
Building for production...
[0/11] Write sources
[6/11] Write swift-version--3A98693DF01E6000.txt
[8/13] Compiling ArgumentParserToolInfo ToolInfo.swift
[9/14] Compiling CSVCoderMacros CSVIndexedMacro.swift
[9/14] 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! (27.17s)
running Raw Parse 1M rows (Iterate Only)... done! (5793.57 ms)
running Raw Parse 1M rows (Iterate + String)... done! (5760.31 ms)
running Raw Parse 100K Quoted Rows (Iterate Only)... done! (444.90 ms)
running Raw Parse 100K Quoted Rows (Iterate + String)... done! (550.14 ms)
running Decode 1K rows (simple)... done! (12.08 ms)
running Decode 10K rows (simple)... done! (126.36 ms)
running Decode 100K rows (simple)... done! (1305.80 ms)
running Decode 1M rows (simple)... done! (11597.59 ms)
running Decode 10K rows (complex, 8 fields)... done! (237.28 ms)
running Decode 100K rows (complex, 8 fields)... done! (2383.14 ms)
running Decode 10K rows (quoted fields)... done! (100.06 ms)
running Decode 10K rows (50 columns wide)... done! (826.37 ms)
running Decode 10K rows (500-byte fields)... done! (342.89 ms)
running Decode 100K rows (numeric fields)... done! (1159.84 ms)
running Decode 50K orders (18 fields, optionals)... done! (2761.58 ms)
running Decode 100K transactions (13 fields)... done! (4337.33 ms)
running Decode 100K log entries (12 fields)... done! (3921.14 ms)
running Decode 10K stress-quoted (nested quotes, newlines)... done! (87.83 ms)
running Decode 50K Unicode-heavy rows... done! (532.79 ms)
running Decode 1K rows (10KB fields)... done! (593.36 ms)
running Decode 1K rows (200 columns wide)... done! (290.59 ms)
running Encode 1K rows... done! (6.56 ms)
running Encode 10K rows... done! (55.20 ms)
running Encode 100K rows... done! (561.89 ms)
running Encode 1M rows... done! (5759.17 ms)
running Encode 10K rows (quoted fields)... done! (67.54 ms)
running Encode 10K rows (500-byte fields)... done! (375.38 ms)
running Encode 50K orders (18 fields, optionals)... done! (1210.44 ms)
running Encode 100K rows to Data... done! (650.47 ms)
running Encode 100K rows to String... done! (642.70 ms)
running Decode 1K rows with snake_case conversion... done! (14.60 ms)
running Decode 1K rows with flexible date parsing... done! (635.13 ms)
running Decode 1K rows with flexible number parsing... done! (923.01 ms)
running Decode 100K rows (sequential, p=1)... done! (2800.50 ms)
running Decode 100K rows (parallel, p=all)... done! (2238.10 ms)
running Decode 1M rows (parallel, p=all)... done! (45114.93 ms)
running Encode 100K rows (sequential, p=1)... done! (544.13 ms)
running Encode 100K rows (parallel, p=all)... done! (270.99 ms)
running Encode 1M rows (parallel, p=all)... done! (3295.00 ms)
running Decode 100K from file (parallel)... done! (2057.48 ms)
running Encode 100K to file (parallel)... done! (342.31 ms)
running Mixed: Decode + Transform + Encode 10K... done! (168.19 ms)
running Mixed: Filter + Aggregate 100K orders... done! (2474.07 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)                    1900109291.000 ns ±   7.28 %          3
Raw Parse 1M rows (Iterate + String)                1902266417.000 ns ±   1.88 %          3
Raw Parse 100K Quoted Rows (Iterate Only)            152573958.000 ns ±   6.76 %          3
Raw Parse 100K Quoted Rows (Iterate + String)        185945958.000 ns ±   5.11 %          3
Decode 1K rows (simple)                                3801542.000 ns ±  13.30 %          3
Decode 10K rows (simple)                              39172500.000 ns ±  15.74 %          3
Decode 100K rows (simple)                            417966625.000 ns ±   8.82 %          3
Decode 1M rows (simple)                             3833413417.000 ns ±   4.79 %          3
Decode 10K rows (complex, 8 fields)                   79158500.000 ns ±   0.51 %          3
Decode 100K rows (complex, 8 fields)                 801421250.000 ns ±   1.58 %          3
Decode 10K rows (quoted fields)                       33077541.000 ns ±   1.55 %          3
Decode 10K rows (50 columns wide)                    276502000.000 ns ±   1.02 %          3
Decode 10K rows (500-byte fields)                    113955375.000 ns ±   2.15 %          3
Decode 100K rows (numeric fields)                    385088750.000 ns ±   1.81 %          3
Decode 50K orders (18 fields, optionals)             950865542.000 ns ±   7.67 %          3
Decode 100K transactions (13 fields)                1420346916.000 ns ±   3.48 %          3
Decode 100K log entries (12 fields)                 1264816416.000 ns ±  12.38 %          3
Decode 10K stress-quoted (nested quotes, newlines)    28844292.000 ns ±   4.42 %          3
Decode 50K Unicode-heavy rows                        173896875.000 ns ±   6.36 %          3
Decode 1K rows (10KB fields)                         193782666.000 ns ±  12.25 %          3
Decode 1K rows (200 columns wide)                     95517917.000 ns ±   4.30 %          3
Encode 1K rows                                         1817500.000 ns ±  35.93 %          3
Encode 10K rows                                       18310583.000 ns ±   1.09 %          3
Encode 100K rows                                     184084542.000 ns ±   4.52 %          3
Encode 1M rows                                      1896651708.000 ns ±   2.43 %          3
Encode 10K rows (quoted fields)                       19988334.000 ns ±  31.45 %          3
Encode 10K rows (500-byte fields)                    130458416.000 ns ±   7.24 %          3
Encode 50K orders (18 fields, optionals)             400093708.000 ns ±   3.74 %          3
Encode 100K rows to Data                             216418542.000 ns ±   2.23 %          3
Encode 100K rows to String                           211281500.000 ns ±   2.59 %          3
Decode 1K rows with snake_case conversion              3814709.000 ns ±  48.67 %          3
Decode 1K rows with flexible date par...
Read more

CSVCoder v0.0.1

29 Dec 10:34
6043d2c

Choose a tag to compare

CSVCoder v0.0.1

What's Changed in v0.0.1

Initial release

  • 6043d2c feat: auto-release on every commit to main with patch version bump (Gigi)
  • 5f75aa6 chore: Apply SwiftProjectKit sync - formatting and linting (Gigi)
  • 0c55660 Add SIMD/SWAR performance optimizations for CSV parsing (Gigi)
  • 7983a40 Update CLAUDE.md (Gigi)
  • 0737374 Update README with latest benchmark results (Gigi)
  • 81d71e5 Add multi-encoding support with zero-copy optimization (Gigi)
  • bf7d898 Fix trimWhitespace configuration consistency across all decode paths (Gigi)
  • d5da4fe Add comprehensive DocC documentation and remove dev artifacts (Gigi)
  • 55d9577 Consolidate benchmarks with hardware info and add release CI/CD (Gigi)
  • 64e03db Update migration plan: Phase 3 complete (Gigi)
  • d4326aa Organize source files into logical directory structure (Gigi)
  • 3f683c7 Phase 3: Split CSVDecoderTests.swift into focused test suites (Gigi)
  • 9fc5ff7 Complete Phase 2: LotoFuel migration assessment (Gigi)
  • 52c648e Update migration plan: document CSVDataNormalizer assessment (Gigi)
  • daf71d8 Add locale-aware decoding strategies using Foundation FormatStyle (Gigi)
  • 31eff84 Fix protocol hierarchy to prevent duplicate conformance issue (Gigi)
  • a5b5b1a Fix @CSVIndexed macro to respect struct access level (Gigi)
  • efa3edf Implement high-performance Raw API with safe wrapper (Gigi)
  • 99ea911 Add nested Codable type support with 3 strategies (Gigi)
  • 75ec597 Fix artifact upload for DocC files with colons (Gigi)
  • f6128c2 Fix parallel speedup test calculation (Gigi)
  • c1deb8a Fix DocC output path permission issue (Gigi)
  • 6bf8af4 Fix CI/CD issues and DocC warnings (Gigi)
  • 7b35c48 Add parallel benchmarks, comprehensive DocC documentation (Gigi)
  • 373723b Add parallelization verification tests (Gigi)
  • 95aee19 Remove force unwraps, scale benchmarks 10-100x, use Xcode 26.1.1 (Gigi)
  • d2c1d7d Polish package for release with performance benchmarks (Gigi)
  • c9250b2 Implement zero-copy decoding and streaming encoding optimizations (Gigi)
  • 2bd547c Add streaming/parallel encoding, Swift macros, and improved error messages (Gigi)
  • 123c8fa Add flexible decoding strategies for dates, numbers, and booleans (Gigi)
  • 3739577 Add nonisolated annotations for Swift 6.2 Approachable Concurrency (Gigi)
  • ac17475 Add CSVEncoder and enhance decoder with Decimal/UUID/URL support (Gigi)
  • a67fe27 Initial release: CSVCoder 1.0.0 (Gigi)

Benchmark Results

Click to expand benchmark results
Fetching https://github.com/swiftlang/swift-syntax.git
Fetching https://github.com/google/swift-benchmark
[1/1490] Fetching swift-benchmark
[1491/74707] Fetching swift-benchmark, swift-syntax
Fetched https://github.com/google/swift-benchmark from cache (4.68s)
Fetched https://github.com/swiftlang/swift-syntax.git from cache (4.68s)
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.64s)
Computing version for https://github.com/google/swift-benchmark
Computed https://github.com/google/swift-benchmark at 0.1.2 (8.71s)
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.91s)
Computed https://github.com/google/swift-benchmark at 0.1.2 (0.92s)
Computing version for https://github.com/swiftlang/swift-docc-plugin
Computed https://github.com/swiftlang/swift-docc-plugin at 1.4.5 (0.37s)
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.72s)
Computed https://github.com/swiftlang/swift-docc-plugin at 1.4.5 (0.73s)
Computing version for https://github.com/swiftlang/swift-docc-symbolkit
Computed https://github.com/swiftlang/swift-docc-symbolkit at 1.0.0 (0.39s)
Computing version for https://github.com/swiftlang/swift-syntax.git
Computed https://github.com/swiftlang/swift-syntax.git at 602.0.0 (0.47s)
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.27s)
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/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/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-docc-symbolkit
Working copy of https://github.com/swiftlang/swift-docc-symbolkit resolved at 1.0.0
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.11s)
Building for production...
[0/11] Write sources
[6/11] Write swift-version--3A98693DF01E6000.txt
[8/13] Compiling CSVCoderMacros CSVIndexedMacro.swift
[8/13] Write Objects.LinkFileList
[10/13] Compiling ArgumentParserToolInfo ToolInfo.swift
[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! (24.46s)
running Raw Parse 1M rows (Iterate Only)... done! (5255.59 ms)
running Raw Parse 1M rows (Iterate + String)... done! (5878.86 ms)
running Raw Parse 100K Quoted Rows (Iterate Only)... done! (517.06 ms)
running Raw Parse 100K Quoted Rows (Iterate + String)... done! (541.20 ms)
running Decode 1K rows (simple)... done! (11.54 ms)
running Decode 10K rows (simple)... done! (107.83 ms)
running Decode 100K rows (simple)... done! (1137.24 ms)
running Decode 1M rows (simple)... done! (11355.02 ms)
running Decode 10K rows (complex, 8 fields)... done! (226.89 ms)
running Decode 100K rows (complex, 8 fields)... done! (2473.38 ms)
running Decode 10K rows (quoted fields)... done! (113.10 ms)
running Decode 10K rows (50 columns wide)... done! (881.92 ms)
running Decode 10K rows (500-byte fields)... done! (406.08 ms)
running Decode 100K rows (numeric fields)... done! (1317.58 ms)
running Decode 50K orders (18 fields, optionals)... done! (3008.33 ms)
running Decode 100K transactions (13 fields)... done! (3842.04 ms)
running Decode 100K log entries (12 fields)... done! (3532.21 ms)
running Decode 10K stress-quoted (nested quotes, newlines)... done! (90.95 ms)
running Decode 50K Unicode-heavy rows... done! (491.13 ms)
running Decode 1K rows (10KB fields)... done! (497.80 ms)
running Decode 1K rows (200 columns wide)... done! (301.04 ms)
running Encode 1K rows... done! (6.92 ms)
running Encode 10K rows... done! (56.31 ms)
running Encode 100K rows... done! (572.00 ms)
running Encode 1M rows... done! (6953.74 ms)
running Encode 10K rows (quoted fields)... done! (81.18 ms)
running Encode 10K rows (500-byte fields)... done! (474.13 ms)
running Encode 50K orders (18 fields, optionals)... done! (1327.06 ms)
running Encode 100K rows to Data... done! (698.60 ms)
running Encode 100K rows to String... done! (695.39 ms)
running Decode 1K rows with snake_case conversion... done! (14.48 ms)
running Decode 1K rows with flexible date parsing... done! (618.48 ms)
running Decode 1K rows with flexible number parsing... done! (882.53 ms)
running Decode 100K rows (sequential, p=1)... done! (2622.38 ms)
running Decode 100K rows (parallel, p=all)... done! (1910.14 ms)
running Decode 1M rows (parallel, p=all)... done! (48075.85 ms)
running Encode 100K rows (sequential, p=1)... done! (647.43 ms)
running Encode 100K rows (parallel, p=all)... done! (398.44 ms)
running Encode 1M rows (parallel, p=all)... done! (4270.43 ms)
running Decode 100K from file (parallel)... done! (2278.04 ms)
running Encode 100K to file (parallel)... done! (461.26 ms)
running Mixed: Decode + Transform + Encode 10K... done! (255.01 ms)
running Mixed: Filter + Aggregate 100K orders... done! (3276.92 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)                    1735857208.000 ns ±   1.95 %          3
Raw Parse 1M rows (Iterate + String)                1951370417.000 ns ±   2.57 %          3
Raw Parse 100K Quoted Rows (Iterate Only)            169238208.000 ns ±   4.09 %          3
Raw Parse 100K Quoted Rows (Iterate + String)        178150750.000 ns ±   3.72 %          3
Decode 1K rows (simple)                                3943458.000 ns ±   4.42 %          3
Decode 10K rows (simple)                              35838500.000 ns ±   1.19 %          3
Decode 100K rows (simple)                            370718792.000 ns ±   6.76 %          3
Decode 1M rows (simple)                             3772942583.000 ns ±   3.51 %          3
Decode 10K rows (complex, 8 fie...
Read more