Skip to content

Arrow PyCapsule stream, pyarrow-free to_polars and Excel-compatible XLSB integers (v5.1.1) - #134

Merged
GabrielMarquezMatte merged 8 commits into
masterfrom
develop
Sep 30, 2026
Merged

GabrielMarquezMatte merged 8 commits into
masterfrom
develop

Conversation

@GabrielMarquezMatte

Copy link
Copy Markdown
Owner

Summary

  • Arrow PyCapsule stream (Python). Workbook.to_arrow_stream(schema, header_row=1, batch_size=10000)
    returns an ArrowStream implementing __arrow_c_stream__, built with ctypes alone. Any consumer of
    the Arrow PyCapsule interface takes it directly: pl.DataFrame(stream),
    pyarrow.RecordBatchReader.from_stream(stream), pd.DataFrame.from_arrow(stream) (pandas 3).
    The stream is single-use, and an unconsumed stream or a dropped capsule releases the native read.
  • to_polars() no longer needs pyarrow. With parallelism=1 (the default) it goes through
    to_arrow_stream() and polars.DataFrame, still streamed and still chunked. parallelism other
    than 1 keeps the whole-sheet path through to_record_batch(), which still requires pyarrow.
  • XLSB integers in RK's float form. The writer now encodes an integral number in BrtCellRk's
    float form whenever it is exact (every integer up to ±524,288, so every date serial), which is what
    Excel does. Before, it always used the int form. That is valid MS-XLSB, but calamine ignores a date
    style on it, so polars.read_excel read our XLSB dates back as integers. Same 4-byte record; larger
    integers still use the int form or BrtCellReal.
  • polars engine benchmark. python/benchmarks/bench_polars_engine.py compares excelreader against
    polars.read_excel(engine="calamine") on plain XLSX/XLSB, and against msoffcrypto-tool + calamine on
    encrypted files. It uses a fixed schema on both sides, checks the frames are equal before timing,
    runs each case in a fresh subprocess and reports peak RSS. On 1M rows × 7 columns excelreader is
    3.0–5.3x faster with 4–6x lower peak RSS (Windows, x64).

Housekeeping

  • rust/excelreader/build.rs finds lib.exe through cc::windows_registry, so building the import
    library no longer needs a VS developer prompt (cc added as a build dependency).
    rust/.cargo/config.toml points EXCELREADER_NATIVE_LIB_DIR at the Python package's _lib.
  • v5.1.0 public API promoted to PublicAPI.Shipped.txt.

Compatibility

  • No breaking changes. XL_ABI_VERSION stays 5, and there are no C ABI changes.
  • to_polars() returns the same frame as before.
  • XLSB files written before this change still read correctly in ExcelReader. Only third-party readers
    that ignore the date style on int-form RK cells (calamine) benefit, and only for newly written files.

Test plan

  • dotnet test tests/ExcelReader.Tests: 2450 passed. Adds a theory pinning the RK form for
    0, ±1, 45000 (float) and 524289, 536870911 (int).
  • pytest python/tests against a freshly built native library: 128 passed, 1 xfailed (pre-existing).
    Adds tests for pl.DataFrame(to_arrow_stream()), single use, release when unconsumed, release on
    a dropped capsule, and negative batch_size.
  • Checked against an XLSB saved by Excel: Excel writes integers in the float form, and calamine
    reads those dates correctly.
  • bench_polars_engine.py --rows 1000000 --n 5 against excelreader-native 5.1.0; all cases verified equal.

GabrielMarquezMatte and others added 8 commits September 28, 2026 19:20
…-api-v5.1.0

chore: promote public API for v5.1.0
Bumps OfficeIMO.Excel from 3.4.3 to 3.4.4

---
updated-dependencies:
- dependency-name: OfficeIMO.Excel
  dependency-version: 3.4.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: benchmarks
...

Signed-off-by: dependabot[bot] <support@github.com>
…ts/ExcelReader.Benchmarks/develop/benchmarks-f3f134d891

Bump the benchmarks group with 1 update
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.45%. Comparing base (72c5781) to head (63e98f5).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #134      +/-   ##
==========================================
- Coverage   89.47%   89.45%   -0.03%     
==========================================
  Files         181      181              
  Lines       13611    13612       +1     
  Branches     2514     2515       +1     
==========================================
- Hits        12179    12177       -2     
- Misses        954      956       +2     
- Partials      478      479       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

Benchmark Results

Baseline: master 72c57812, from the series published by benchmark-pages.yml. Both sides ran on a shared ubuntu-latest runner, so treat anything under ±10% as noise.

Moved by at least 10%

Benchmark master This PR Delta
ExcelReader.Benchmarks.ParseBenchmark.OfficeIMO(Rows: 50000) 89.88 ms 172.87 ms +92.3%
ExcelReader.Benchmarks.ChunkedParseBenchmark.WholeSheet(Rows: 50000) 7.01 ms 13.43 ms +91.6%
ExcelReader.Benchmarks.ChunkedParseBenchmark.Batched_10k(Rows: 50000) 7.05 ms 12.87 ms +82.5%
ExcelReader.Benchmarks.NativeTypedParseBenchmark.ParseTyped 31.12 ms 52.37 ms +68.3%
ExcelReader.Benchmarks.NativeTypedParseBenchmark.ParseArrow 31.34 ms 52.19 ms +66.5%
ExcelReader.Benchmarks.NativeRowReadBenchmark.NextRowDecoded 37.21 ms 61.33 ms +64.8%
ExcelReader.Benchmarks.NativeRowReadBenchmark.ReadAllBlob 35.93 ms 58.62 ms +63.2%
ExcelReader.Benchmarks.NativeRowReadBenchmark.NextRowBlob 33.19 ms 53.00 ms +59.7%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsx_ExcelReader_Prefetch 32.80 ms 50.94 ms +55.3%
ExcelReader.Benchmarks.EncryptedWorkbookBenchmark.Plain_Stream 58.52 µs 89.13 µs +52.3%
ExcelReader.Benchmarks.ChunkedParseBenchmark.Batched_1k(Rows: 50000) 8.63 ms 12.96 ms +50.1%
ExcelReader.Benchmarks.EncryptedWorkbookBenchmark.Large_Encrypted_OpenOnly 44.24 ms 64.45 ms +45.7%
ExcelReader.Benchmarks.XlsxSharedStringHotPathBenchmark.EndToEnd_Prefetch(Rows: 65536) 41.86 ms 59.61 ms +42.4%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsx_ExcelReader_Memory_Prefetch 33.35 ms 47.43 ms +42.2%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsm_ExcelReader_Prefetch 34.43 ms 46.98 ms +36.4%
ExcelReader.Benchmarks.CsvParallelVsSepBenchmark.ExcelReader_Sequential(Corpus: ConversionHeavy) 506.97 ms 691.34 ms +36.4%
ExcelReader.Benchmarks.RealDataReadBenchmark.Csv_ExcelReader_Materialized 24.42 ms 33.25 ms +36.2%
ExcelReader.Benchmarks.CsvParallelVsSepBenchmark.ExcelReader_Sequential(Corpus: NarrowInt) 388.68 ms 527.99 ms +35.8%
ExcelReader.Benchmarks.CsvParallelVsSepBenchmark.ExcelReader_Parallel(Corpus: NarrowInt) 253.96 ms 342.30 ms +34.8%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsx_Sylvan 231.96 ms 312.40 ms +34.7%
ExcelReader.Benchmarks.XlsxSharedStringHotPathBenchmark.EndToEnd(Rows: 65536) 49.73 ms 66.06 ms +32.8%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsm_Sylvan 234.88 ms 311.03 ms +32.4%
ExcelReader.Benchmarks.StringHeavyReadBenchmark.Xlsx_Sylvan(Rows: 65536) 219.73 ms 290.92 ms +32.4%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsm_ExcelReader_Memory_Prefetch 36.71 ms 48.58 ms +32.3%
ExcelReader.Benchmarks.RealDataReadBenchmark.Csv_ExcelReader_Memory 6.21 ms 8.22 ms +32.3%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.ConversionHeavyAggregate(Dop: 16) 262.07 ms 344.87 ms +31.6%
ExcelReader.Benchmarks.XlsxSharedStringHotPathBenchmark.Stored_EndToEnd(Rows: 65536) 23.72 ms 31.21 ms +31.6%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.NarrowIntAggregate(Dop: 8) 174.15 ms 228.54 ms +31.2%
ExcelReader.Benchmarks.RealDataTypedParseBenchmark.Xlsx_ExcelParser 70.20 ms 91.06 ms +29.7%
ExcelReader.Benchmarks.XlsReadBenchmark.ExcelReaderAsync(Rows: 50000) 3.01 ms 3.90 ms +29.6%
ExcelReader.Benchmarks.CsvParseBenchmark.Sep(Rows: 50000) 6.90 ms 8.94 ms +29.5%
ExcelReader.Benchmarks.CsvParallelVsSepBenchmark.Sep_Sequential(Corpus: NarrowInt) 353.44 ms 455.55 ms +28.9%
ExcelReader.Benchmarks.NativeRowReadBenchmark.ReadAllDecoded 53.70 ms 69.02 ms +28.5%
ExcelReader.Benchmarks.EncryptedWorkbookBenchmark.Encrypted_OpenOnly 44.68 ms 57.37 ms +28.4%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsx_ExcelReader_Memory 59.71 ms 76.13 ms +27.5%
ExcelReader.Benchmarks.CsvReadBenchmark.Sylvan(Rows: 50000) 3.38 ms 4.30 ms +27.3%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xls_ExcelReader 11.89 ms 15.13 ms +27.3%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsx_ExcelReader 59.89 ms 76.21 ms +27.3%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsm_ExcelReader_Memory 59.49 ms 75.62 ms +27.1%
ExcelReader.Benchmarks.XlsReadBenchmark.ExcelReader(Rows: 50000) 3.01 ms 3.83 ms +27.0%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsm_ExcelReader_Materialized 62.33 ms 78.90 ms +26.6%
ExcelReader.Benchmarks.StringHeavyReadBenchmark.Xlsx_ExcelReader_Prefetch(Rows: 65536) 40.40 ms 51.07 ms +26.4%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.NarrowInt(Dop: 4) 257.88 ms 325.75 ms +26.3%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsm_ExcelReader 60.67 ms 76.62 ms +26.3%
ExcelReader.Benchmarks.RealDataReadBenchmark.Csv_ExcelReader 6.53 ms 8.24 ms +26.2%
ExcelReader.Benchmarks.RealDataReadBenchmark.Csv_Sylvan 5.42 ms 6.83 ms +26.0%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.NarrowInt(Dop: 16) 245.58 ms 308.35 ms +25.6%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsx_ExcelReader_Materialized 62.77 ms 78.52 ms +25.1%
ExcelReader.Benchmarks.CsvParseBenchmark.ExcelParserAsync(Rows: 50000) 3.98 ms 4.97 ms +24.9%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsb_ExcelReader_Memory_Prefetch 17.32 ms 21.61 ms +24.7%
ExcelReader.Benchmarks.ParseBenchmark.ExcelParserXlsbSync(Rows: 50000) 6.68 ms 8.28 ms +24.0%
ExcelReader.Benchmarks.CsvReadBenchmark.ExcelReaderAsync(Rows: 50000) 2.43 ms 3.02 ms +24.0%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xls_ExcelReader_Memory 11.99 ms 14.80 ms +23.5%
ExcelReader.Benchmarks.CsvParallelVsSepBenchmark.Sep_Parallel(Corpus: NarrowInt) 328.18 ms 405.34 ms +23.5%
ExcelReader.Benchmarks.ReadBenchmark.OfficeIMO(Rows: 50000) 140.56 ms 173.32 ms +23.3%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsb_ExcelReader_Prefetch 17.75 ms 21.86 ms +23.2%
ExcelReader.Benchmarks.StringHeavyReadBenchmark.Xlsb_ExcelReader_Prefetch(Rows: 65536) 34.44 ms 42.39 ms +23.1%
ExcelReader.Benchmarks.StringHeavyReadBenchmark.Xlsx_ExcelReader(Rows: 65536) 50.52 ms 62.17 ms +23.1%
ExcelReader.Benchmarks.StringHeavyReadBenchmark.Xlsb_ExcelReader(Rows: 65536) 43.30 ms 53.13 ms +22.7%
ExcelReader.Benchmarks.XlsReadBenchmark.Sylvan(Rows: 50000) 5.12 ms 6.27 ms +22.4%
ExcelReader.Benchmarks.CsvParseBenchmark.ExcelParserSync(Rows: 50000) 3.89 ms 4.75 ms +22.0%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.NarrowIntAggregate(Dop: 16) 174.11 ms 212.27 ms +21.9%
ExcelReader.Benchmarks.CsvParallelVsSepBenchmark.Sep_Sequential(Corpus: ConversionHeavy) 622.68 ms 757.82 ms +21.7%
ExcelReader.Benchmarks.CsvParallelVsSepBenchmark.ExcelReader_Parallel(Corpus: ConversionHeavy) 276.43 ms 335.85 ms +21.5%
ExcelReader.Benchmarks.StringHeavyReadBenchmark.Xlsb_ExcelReader_Memory(Rows: 65536) 42.60 ms 51.68 ms +21.3%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xls_ExcelReader_Materialized 14.34 ms 17.38 ms +21.2%
ExcelReader.Benchmarks.EncryptedWorkbookBenchmark.Large_Encrypted_Stream 102.75 ms 124.45 ms +21.1%
ExcelReader.Benchmarks.CsvReadBenchmark.Sep(Rows: 50000) 7.76 ms 9.40 ms +21.1%
ExcelReader.Benchmarks.XlsxSharedStringHotPathBenchmark.IndexParse_Utf8Parser(Rows: 65536) 2.61 ms 3.16 ms +21.0%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsb_Sylvan 35.33 ms 42.46 ms +20.2%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.ConversionHeavyAggregate(Dop: 8) 257.62 ms 309.40 ms +20.1%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.ConversionHeavy(Dop: 16) 400.63 ms 480.51 ms +19.9%
ExcelReader.Benchmarks.RealDataTypedParseBenchmark.Xlsb_ExcelParser 38.87 ms 46.41 ms +19.4%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.NarrowInt(Dop: 1) 435.29 ms 518.97 ms +19.2%
ExcelReader.Benchmarks.ParseBenchmark.ExcelParserAsync(Rows: 50000) 9.77 ms 11.64 ms +19.1%
ExcelReader.Benchmarks.StringHeavyReadBenchmark.Xlsb_Sylvan(Rows: 65536) 74.58 ms 88.69 ms +18.9%
ExcelReader.Benchmarks.ParseBenchmark.ExcelParserXlsbAsync(Rows: 50000) 6.93 ms 8.23 ms +18.8%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.NarrowInt(Dop: 2) 384.17 ms 455.89 ms +18.7%
ExcelReader.Benchmarks.StringHeavyReadBenchmark.Xlsb_ExcelReader_Materialized_Interned(Rows: 65536) 67.03 ms 79.53 ms +18.7%
ExcelReader.Benchmarks.ParseBenchmark.ExcelParserSync(Rows: 50000) 9.47 ms 11.24 ms +18.6%
ExcelReader.Benchmarks.ReadBenchmark.ExcelReaderAsync(Rows: 50000) 8.17 ms 9.69 ms +18.6%
ExcelReader.Benchmarks.EncryptedWorkbookBenchmark.Large_Plain_Stream 50.17 ms 59.38 ms +18.3%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsb_ExcelReader 29.45 ms 34.69 ms +17.8%
ExcelReader.Benchmarks.ParseBenchmark.RefStructModelSync(Rows: 50000) 8.07 ms 9.50 ms +17.8%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.ConversionHeavyAggregate(Dop: 4) 271.73 ms 319.07 ms +17.4%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xls_Sylvan 21.73 ms 25.49 ms +17.3%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsb_ExcelReader_Memory 29.44 ms 34.49 ms +17.2%
ExcelReader.Benchmarks.EncryptedWorkbookBenchmark.Encrypted_Stream 49.86 ms 58.34 ms +17.0%
ExcelReader.Benchmarks.EncryptedWorkbookBenchmark.Encrypted_Stream_VerifyIntegrity 50.03 ms 58.53 ms +17.0%
ExcelReader.Benchmarks.StringHeavyReadBenchmark.Xlsx_ExcelReader_Materialized_Interned(Rows: 65536) 76.41 ms 88.70 ms +16.1%
ExcelReader.Benchmarks.ReadBenchmark.Sylvan(Rows: 50000) 35.33 ms 40.92 ms +15.8%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.NarrowIntAggregate(Dop: 1) 367.58 ms 425.44 ms +15.7%
ExcelReader.Benchmarks.CsvParseBenchmark.Sylvan(Rows: 50000) 9.83 ms 11.35 ms +15.4%
ExcelReader.Benchmarks.XlsxSharedStringHotPathBenchmark.IndexParse_DigitLoop(Rows: 65536) 1.63 ms 1.88 ms +15.3%
ExcelReader.Benchmarks.StringHeavyReadBenchmark.Xlsx_ExcelReader_Materialized(Rows: 65536) 77.69 ms 89.57 ms +15.3%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.NarrowIntAggregate(Dop: 2) 272.51 ms 314.08 ms +15.3%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.NarrowIntAggregate(Dop: 4) 164.53 ms 189.60 ms +15.2%
ExcelReader.Benchmarks.EncryptedWorkbookBenchmark.Encrypted_Memory 50.11 ms 57.66 ms +15.1%
ExcelReader.Benchmarks.ParseBenchmark.ExcelParserStructSync(Rows: 50000) 9.11 ms 10.46 ms +14.8%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.ConversionHeavy(Dop: 8) 402.09 ms 461.48 ms +14.8%
ExcelReader.Benchmarks.ReadBenchmark.ExcelReader(Rows: 50000) 7.72 ms 8.82 ms +14.3%
ExcelReader.Benchmarks.ReadBenchmark.ExcelReaderMaterialized(Rows: 50000) 9.02 ms 10.30 ms +14.2%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.ConversionHeavy(Dop: 1) 804.00 ms 918.13 ms +14.2%
ExcelReader.Benchmarks.ParseBenchmark.ExcelParserSyncSharedStrings(Rows: 50000) 9.24 ms 10.41 ms +12.7%
ExcelReader.Benchmarks.RealDataReadBenchmark.Xlsb_ExcelReader_Materialized 32.85 ms 36.96 ms +12.5%
ExcelReader.Benchmarks.CsvReadBenchmark.ExcelReader(Rows: 50000) 4.42 ms 4.95 ms +11.9%
ExcelReader.Benchmarks.XlsxSharedStringHotPathBenchmark.SharedStringPrologue(Rows: 65536) 17.81 ms 19.88 ms +11.7%
ExcelReader.Benchmarks.StringHeavyReadBenchmark.Xlsb_ExcelReader_Materialized(Rows: 65536) 70.75 ms 78.92 ms +11.5%
ExcelReader.Benchmarks.CsvReadBenchmark.ExcelReaderWide(Rows: 50000) 8.52 ms 9.39 ms +10.2%
ExcelReader.Benchmarks.CsvParallelParseBenchmark.NarrowInt(Dop: 8) 265.20 ms 291.88 ms +10.1%
ExcelReader.Benchmarks.ArrowConversionBenchmark.CsvAllString(Rows: 100000) 31.42 ms 27.88 ms -11.3%
ExcelReader.Benchmarks.DataReaderBenchmark.Baseline_RawRows(Rows: 50000) 10.83 ms 9.49 ms -12.4%
ExcelReader.Benchmarks.ArrowConversionBenchmark.CsvTypedWithInference(Rows: 100000) 17.47 ms 14.64 ms -16.2%

46 within ±10%.

Full results per group

ExcelReader.Benchmarks.ArrowConversionBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 9V74 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio RatioSD Gen0 Gen1 Gen2 Allocated Alloc Ratio
CsvAllString 100000 27.88 ms 1.175 ms 0.305 ms 1.00 0.01 687.5000 562.5000 562.5000 16.27 MB 1.00
CsvTyped 100000 13.81 ms 0.931 ms 0.144 ms 0.50 0.01 421.8750 375.0000 375.0000 8.13 MB 0.50
XlsbTyped 100000 22.87 ms 3.315 ms 0.861 ms 0.82 0.03 375.0000 343.7500 343.7500 8.15 MB 0.50
CsvTypedWithInference 100000 14.64 ms 1.068 ms 0.165 ms 0.53 0.01 656.2500 593.7500 593.7500 14.89 MB 0.92

ExcelReader.Benchmarks.ChunkedParseBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio Gen0 Gen1 Allocated Alloc Ratio
WholeSheet 50000 13.43 ms 0.202 ms 0.053 ms 1.00 78.1250 62.5000 1.31 MB 1.00
Batched_10k 50000 12.87 ms 0.244 ms 0.063 ms 0.96 93.7500 46.8750 1.6 MB 1.23
Batched_1k 50000 12.96 ms 0.051 ms 0.013 ms 0.96 93.7500 - 1.52 MB 1.16

ExcelReader.Benchmarks.ColdStartBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3
  Job-GOEFXF : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3

InvocationCount=1  IterationCount=1  LaunchCount=16  
RunStrategy=ColdStart  UnrollFactor=1  WarmupCount=0  

Method Rows Mean Error StdDev Allocated
TypedParseFirstUse 200 42.03 ms 0.323 ms 0.317 ms 28.43 KB
RecordWriteFirstUse 200 24.70 ms 0.253 ms 0.248 ms 84.25 KB
FluentParseFirstUse 200 36.14 ms 0.541 ms 0.532 ms 30.95 KB
FluentParseWithAttributeFallbackFirstUse 200 45.64 ms 0.635 ms 0.624 ms 32.65 KB

ExcelReader.Benchmarks.CsvParallelParseBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
Intel Xeon 6973P-C 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4

IterationCount=5  WarmupCount=1  

Method Dop Mean Error StdDev Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
ConversionHeavy 1 918.1 ms 69.59 ms 10.77 ms 1.00 0.01 8000.0000 - 687048.53 KB 1.000
NarrowInt 1 519.0 ms 22.79 ms 3.53 ms 0.57 0.01 3000.0000 - 251159.83 KB 0.366
ConversionHeavyAggregate 1 686.2 ms 33.41 ms 8.68 ms 0.75 0.01 - - 827.41 KB 0.001
NarrowIntAggregate 1 425.4 ms 42.98 ms 6.65 ms 0.46 0.01 - - 814.81 KB 0.001
ConversionHeavy 2 642.9 ms 105.04 ms 27.28 ms 1.00 0.05 8000.0000 3000.0000 694949.95 KB 1.000
NarrowInt 2 455.9 ms 39.34 ms 6.09 ms 0.71 0.03 3000.0000 - 259138.2 KB 0.373
ConversionHeavyAggregate 2 496.1 ms 73.68 ms 11.40 ms 0.77 0.03 - - 1306.26 KB 0.002
NarrowIntAggregate 2 314.1 ms 51.40 ms 13.35 ms 0.49 0.03 - - 1241.3 KB 0.002
ConversionHeavy 4 443.9 ms 46.53 ms 12.08 ms 1.00 0.04 8000.0000 7000.0000 695106.34 KB 1.000
NarrowInt 4 325.8 ms 20.52 ms 5.33 ms 0.73 0.02 3000.0000 500.0000 259421.09 KB 0.373
ConversionHeavyAggregate 4 319.1 ms 85.85 ms 22.30 ms 0.72 0.05 - - 1292.6 KB 0.002
NarrowIntAggregate 4 189.6 ms 7.58 ms 1.97 ms 0.43 0.01 - - 1249.79 KB 0.002
ConversionHeavy 8 461.5 ms 77.02 ms 20.00 ms 1.00 0.06 8000.0000 7000.0000 695192.07 KB 1.000
NarrowInt 8 291.9 ms 64.03 ms 9.91 ms 0.63 0.03 3000.0000 1000.0000 259564.42 KB 0.373
ConversionHeavyAggregate 8 309.4 ms 26.08 ms 6.77 ms 0.67 0.03 - - 1269.37 KB 0.002
NarrowIntAggregate 8 228.5 ms 47.74 ms 12.40 ms 0.50 0.03 - - 1325.28 KB 0.002
ConversionHeavy 16 480.5 ms 48.86 ms 12.69 ms 1.00 0.03 8000.0000 4000.0000 695497.34 KB 1.000
NarrowInt 16 308.4 ms 88.21 ms 13.65 ms 0.64 0.03 3000.0000 1000.0000 259522.64 KB 0.373
ConversionHeavyAggregate 16 344.9 ms 18.57 ms 2.87 ms 0.72 0.02 - - 1322.37 KB 0.002
NarrowIntAggregate 16 212.3 ms 13.32 ms 3.46 ms 0.44 0.01 - - 1336.03 KB 0.002

ExcelReader.Benchmarks.CsvParallelVsSepBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
Intel Xeon 6973P-C 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4

IterationCount=5  WarmupCount=1  

Method Corpus Mean Error StdDev Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
ExcelReader_Sequential NarrowInt 528.0 ms 10.88 ms 1.68 ms 1.00 0.00 3000.0000 - 244.14 MB 1.00
ExcelReader_Parallel NarrowInt 342.3 ms 91.33 ms 23.72 ms 0.65 0.04 3000.0000 1000.0000 253.15 MB 1.04
Sep_Sequential NarrowInt 455.6 ms 10.05 ms 2.61 ms 0.86 0.01 3000.0000 - 244.15 MB 1.00
Sep_Parallel NarrowInt 405.3 ms 20.66 ms 5.37 ms 0.77 0.01 3000.0000 1000.0000 255.93 MB 1.05
ExcelReader_Sequential ConversionHeavy 691.3 ms 29.96 ms 7.78 ms 1.00 0.01 5000.0000 - 467.3 MB 1.00
ExcelReader_Parallel ConversionHeavy 335.9 ms 14.88 ms 2.30 ms 0.49 0.01 5000.0000 4000.0000 473.63 MB 1.01
Sep_Sequential ConversionHeavy 757.8 ms 21.24 ms 5.52 ms 1.10 0.01 5000.0000 - 467.31 MB 1.00
Sep_Parallel ConversionHeavy 533.6 ms 84.73 ms 22.00 ms 0.77 0.03 5000.0000 4000.0000 476.42 MB 1.02

ExcelReader.Benchmarks.CsvParseBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
Intel Xeon 6973P-C 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
ExcelParserSync 50000 4.752 ms 0.1105 ms 0.0287 ms 1.00 0.01 46.8750 - 3.86 MB 1.00
ExcelParserAsync 50000 4.971 ms 0.2424 ms 0.0630 ms 1.05 0.01 46.8750 - 3.86 MB 1.00
Sep 50000 8.941 ms 0.4135 ms 0.1074 ms 1.88 0.02 46.8750 - 3.87 MB 1.00
Sylvan 50000 11.349 ms 0.3848 ms 0.0595 ms 2.39 0.02 125.0000 15.6250 10.95 MB 2.84

ExcelReader.Benchmarks.CsvReadBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 9V74 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio Allocated Alloc Ratio
ExcelReader 50000 4.946 ms 0.0123 ms 0.0032 ms 1.00 448 B 1.00
ExcelReaderWide 50000 9.391 ms 0.0705 ms 0.0109 ms 1.90 376 B 0.84
ExcelReaderAsync 50000 3.018 ms 0.0291 ms 0.0076 ms 0.61 520 B 1.16
Sep 50000 9.395 ms 0.0857 ms 0.0222 ms 1.90 4024 B 8.98
Sylvan 50000 4.305 ms 0.0201 ms 0.0052 ms 0.87 38682 B 86.34

ExcelReader.Benchmarks.CsvWriteBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio RatioSD Gen0 Gen1 Gen2 Allocated Alloc Ratio
ExcelReaderWriter 50000 6.348 ms 0.6018 ms 0.1563 ms 1.00 0.03 500.0000 500.0000 500.0000 4 MB 1.00
Sep 50000 10.161 ms 1.3596 ms 0.3531 ms 1.60 0.06 500.0000 500.0000 500.0000 4.01 MB 1.00
SylvanWriter 50000 10.431 ms 0.3478 ms 0.0903 ms 1.64 0.04 500.0000 500.0000 500.0000 4.04 MB 1.01

ExcelReader.Benchmarks.DataReaderBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 9V74 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio RatioSD Gen0 Gen1 Gen2 Allocated Alloc Ratio
Baseline_RawRows 50000 9.485 ms 0.2807 ms 0.0729 ms 1.00 0.01 - - - 11.18 KB 1.00
DataReader_GetValue 50000 13.244 ms 0.1732 ms 0.0268 ms 1.40 0.01 312.5000 - - 5138.82 KB 459.66
DataReader_TypedGetters 50000 14.102 ms 0.2098 ms 0.0545 ms 1.49 0.01 93.7500 - - 1623.2 KB 145.19
DataReader_GetBytes 50000 10.129 ms 0.2961 ms 0.0458 ms 1.07 0.01 - - - 11.87 KB 1.06
DataTable_Load 50000 77.478 ms 9.8075 ms 2.5470 ms 8.17 0.25 2000.0000 1857.1429 857.1429 23400.49 KB 2,093.13

ExcelReader.Benchmarks.EncryptedWorkbookBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 9V74 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
Plain_Stream 89.13 μs 62.52 μs 16.24 μs 1.02 0.23 0.9766 19.42 KB 1.00
Encrypted_Stream 58,338.18 μs 1,962.55 μs 509.67 μs 670.02 97.95 - 48.32 KB 2.49
Encrypted_Stream_VerifyIntegrity 58,528.35 μs 698.08 μs 108.03 μs 672.20 98.64 - 50.26 KB 2.59
Encrypted_Memory 57,660.08 μs 788.65 μs 122.04 μs 662.23 97.18 - 52.75 KB 2.72
Encrypted_OpenOnly 57,374.92 μs 415.70 μs 64.33 μs 658.95 96.69 - 42.8 KB 2.20
Large_Plain_Stream 59,376.99 μs 799.76 μs 123.76 μs 681.95 100.07 - 11.18 KB 0.58
Large_Encrypted_Stream 124,447.01 μs 12,488.41 μs 3,243.20 μs 1,429.28 211.44 - 36.94 KB 1.90
Large_Encrypted_OpenOnly 64,450.62 μs 913.23 μs 141.32 μs 740.22 108.62 - 36.38 KB 1.87

ExcelReader.Benchmarks.NativeRowReadBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Mean Error StdDev Ratio Gen0 Gen1 Gen2 Allocated Alloc Ratio
NextRowBlob 53.00 ms 0.943 ms 0.245 ms 1.00 300.0000 300.0000 300.0000 3.71 MB 1.00
NextRowDecoded 61.33 ms 0.363 ms 0.094 ms 1.16 222.2222 222.2222 222.2222 3.71 MB 1.00
ReadAllBlob 58.62 ms 0.767 ms 0.119 ms 1.11 1000.0000 888.8889 - 21.06 MB 5.68
ReadAllDecoded 69.02 ms 2.490 ms 0.647 ms 1.30 500.0000 500.0000 500.0000 5.71 MB 1.54

ExcelReader.Benchmarks.NativeTypedParseBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Mean Error StdDev Ratio Gen0 Gen1 Gen2 Allocated Alloc Ratio
ParseTyped 52.37 ms 0.134 ms 0.035 ms 1.00 700.0000 500.0000 300.0000 11.61 MB 1.00
ParseArrow 52.19 ms 0.753 ms 0.196 ms 1.00 700.0000 500.0000 300.0000 11.62 MB 1.00

ExcelReader.Benchmarks.ParseBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
Intel Xeon 6973P-C 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
ExcelParserSync 50000 11.236 ms 0.6208 ms 0.1612 ms 1.00 0.02 46.8750 3966.8 KB 1.000
ExcelParserSyncSharedStrings 50000 10.412 ms 0.7788 ms 0.1205 ms 0.93 0.02 15.6250 2357.3 KB 0.594
ExcelParserStructSync 50000 10.461 ms 0.6859 ms 0.1781 ms 0.93 0.02 15.6250 1623.05 KB 0.409
RefStructModelSync 50000 9.501 ms 0.3742 ms 0.0972 ms 0.85 0.01 - 11.72 KB 0.003
ExcelParserAsync 50000 11.643 ms 0.3288 ms 0.0854 ms 1.04 0.02 46.8750 3968.95 KB 1.001
ExcelParserXlsbSync 50000 8.278 ms 1.4157 ms 0.3676 ms 0.74 0.03 46.8750 3968.9 KB 1.001
ExcelParserXlsbAsync 50000 8.231 ms 1.7207 ms 0.4469 ms 0.73 0.04 46.8750 3971.47 KB 1.001
OfficeIMO 50000 172.870 ms 151.0381 ms 39.2241 ms 15.39 3.19 - 5833.8 KB 1.471
Sylvan 50000 53.250 ms 4.9146 ms 1.2763 ms 4.74 0.12 100.0000 10726.41 KB 2.704
SylvanAsync 50000 57.143 ms 11.0658 ms 2.8738 ms 5.09 0.24 100.0000 10735.13 KB 2.706

ExcelReader.Benchmarks.ReadBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 9V74 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
ExcelReader 50000 8.817 ms 0.0188 ms 0.0049 ms 1.00 0.00 - 11.18 KB 1.00
ExcelReaderAsync 50000 9.689 ms 0.0214 ms 0.0056 ms 1.10 0.00 - 13.31 KB 1.19
ExcelReaderXlsb 50000 5.640 ms 0.0140 ms 0.0036 ms 0.64 0.00 - 13.28 KB 1.19
ExcelReaderXlsbAsync 50000 5.951 ms 0.0701 ms 0.0182 ms 0.67 0.00 - 15.84 KB 1.42
ExcelReaderMaterialized 50000 10.302 ms 0.0268 ms 0.0042 ms 1.17 0.00 93.7500 1622.51 KB 145.13
Sylvan 50000 40.923 ms 0.6319 ms 0.0978 ms 4.64 0.01 76.9231 1939.18 KB 173.46
OfficeIMO 50000 173.315 ms 205.1407 ms 31.7457 ms 19.66 3.20 - 7003.67 KB 626.46
OfficeIMOXlsb 50000 12.385 ms 0.3184 ms 0.0827 ms 1.40 0.01 406.2500 6858.69 KB 613.50

ExcelReader.Benchmarks.RealDataReadBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4

IterationCount=5  WarmupCount=1  

Method Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
Xlsx_ExcelReader 76.215 ms 1.3918 ms 0.2154 ms 1.00 0.00 - 18288 B 1.00
Xlsx_Sylvan 312.399 ms 2.1761 ms 0.5651 ms 4.10 0.01 - 659568 B 36.07
Xlsx_ExcelReader_Materialized 78.521 ms 0.3150 ms 0.0487 ms 1.03 0.00 - 27984 B 1.53
Xlsx_ExcelReader_Prefetch 50.944 ms 13.9726 ms 3.6286 ms 0.67 0.04 - 38291 B 2.09
Xlsx_ExcelReader_Memory 76.131 ms 0.3606 ms 0.0937 ms 1.00 0.00 - 7176 B 0.39
Xlsx_ExcelReader_Memory_Prefetch 47.425 ms 6.0749 ms 1.5776 ms 0.62 0.02 - 27182 B 1.49
Xlsm_ExcelReader 76.619 ms 0.2432 ms 0.0632 ms 1.01 0.00 - 18288 B 1.00
Xlsm_Sylvan 311.034 ms 5.2077 ms 0.8059 ms 4.08 0.01 - 659648 B 36.07
Xlsm_ExcelReader_Materialized 78.897 ms 0.4375 ms 0.1136 ms 1.04 0.00 - 27984 B 1.53
Xlsm_ExcelReader_Prefetch 46.978 ms 7.2443 ms 1.8813 ms 0.62 0.02 - 38751 B 2.12
Xlsm_ExcelReader_Memory 75.620 ms 0.2487 ms 0.0385 ms 0.99 0.00 - 7176 B 0.39
Xlsm_ExcelReader_Memory_Prefetch 48.582 ms 10.7240 ms 2.7850 ms 0.64 0.03 - 27152 B 1.48
Xlsb_ExcelReader 34.687 ms 0.1605 ms 0.0417 ms 0.46 0.00 - 19256 B 1.05
Xlsb_Sylvan 42.459 ms 0.3750 ms 0.0580 ms 0.56 0.00 - 346673 B 18.96
Xlsb_ExcelReader_Materialized 36.962 ms 0.1186 ms 0.0183 ms 0.48 0.00 - 28952 B 1.58
Xlsb_ExcelReader_Prefetch 21.857 ms 5.1705 ms 0.8001 ms 0.29 0.01 - 44357 B 2.43
Xlsb_ExcelReader_Memory 34.487 ms 0.1074 ms 0.0279 ms 0.45 0.00 - 8896 B 0.49
Xlsb_ExcelReader_Memory_Prefetch 21.610 ms 2.6550 ms 0.6895 ms 0.28 0.01 - 29898 B 1.63
Xls_ExcelReader 15.128 ms 0.2202 ms 0.0572 ms 0.20 0.00 - 11576 B 0.63
Xls_Sylvan 25.491 ms 0.2402 ms 0.0624 ms 0.33 0.00 - 190366 B 10.41
Xls_ExcelReader_Materialized 17.382 ms 0.0687 ms 0.0178 ms 0.23 0.00 - 21272 B 1.16
Xls_ExcelReader_Memory 14.804 ms 0.0474 ms 0.0073 ms 0.19 0.00 - 11576 B 0.63
Csv_ExcelReader 8.239 ms 0.2236 ms 0.0581 ms 0.11 0.00 - 376 B 0.02
Csv_Sylvan 6.830 ms 0.0747 ms 0.0194 ms 0.09 0.00 - 41226 B 2.25
Csv_ExcelReader_Materialized 33.249 ms 1.8567 ms 0.4822 ms 0.44 0.01 1466.6667 37442984 B 2,047.41
Csv_ExcelReader_Memory 8.220 ms 0.2131 ms 0.0553 ms 0.11 0.00 - 312 B 0.02

ExcelReader.Benchmarks.RealDataTypedParseBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4

IterationCount=5  WarmupCount=1  

Method Mean Error StdDev Ratio Gen0 Allocated Alloc Ratio
Xlsx_ExcelParser 91.06 ms 0.771 ms 0.119 ms 1.00 333.3333 8.03 MB 1.00
Xlsb_ExcelParser 46.41 ms 0.171 ms 0.044 ms 0.51 272.7273 8.03 MB 1.00

ExcelReader.Benchmarks.RecordWriteBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio RatioSD Gen0 Gen1 Gen2 Allocated Alloc Ratio
Xlsx 50000 16.891 ms 2.0456 ms 0.5312 ms 1.00 0.04 500.0000 500.0000 500.0000 4.02 MB 1.00
Xlsb 50000 10.412 ms 0.2459 ms 0.0639 ms 0.62 0.02 500.0000 500.0000 500.0000 4.02 MB 1.00
Xls 50000 7.297 ms 0.2770 ms 0.0429 ms 0.43 0.01 273.4375 273.4375 273.4375 4.03 MB 1.00
Csv 50000 6.498 ms 0.4180 ms 0.1086 ms 0.38 0.01 500.0000 500.0000 500.0000 4 MB 1.00
XlsxMapped 50000 19.643 ms 1.8236 ms 0.4736 ms 1.16 0.04 500.0000 500.0000 500.0000 4.02 MB 1.00
XlsbMapped 50000 11.646 ms 0.6850 ms 0.1060 ms 0.69 0.02 500.0000 500.0000 500.0000 4.02 MB 1.00
CsvMapped 50000 8.199 ms 0.2785 ms 0.0723 ms 0.49 0.01 500.0000 500.0000 500.0000 4 MB 1.00

ExcelReader.Benchmarks.StringHeavyReadBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio RatioSD Gen0 Gen1 Gen2 Allocated Alloc Ratio
Xlsx_ExcelReader 65536 62.17 ms 0.411 ms 0.107 ms 1.00 0.00 - - - 2.19 MB 1.00
Xlsx_ExcelReader_Prefetch 65536 51.07 ms 19.639 ms 3.039 ms 0.82 0.04 - - - 2.25 MB 1.03
Xlsx_Sylvan 65536 290.92 ms 8.839 ms 2.296 ms 4.68 0.03 500.0000 - - 17.41 MB 7.96
Xlsx_ExcelReader_Materialized 65536 89.57 ms 9.042 ms 2.348 ms 1.44 0.03 833.3333 666.6667 166.6667 15.26 MB 6.97
Xlsx_ExcelReader_Materialized_Interned 65536 88.70 ms 4.716 ms 0.730 ms 1.43 0.01 833.3333 666.6667 166.6667 15.27 MB 6.98
Xlsb_ExcelReader 65536 53.13 ms 0.209 ms 0.032 ms 0.85 0.00 - - - 2.19 MB 1.00
Xlsb_ExcelReader_Prefetch 65536 42.39 ms 8.057 ms 1.247 ms 0.68 0.02 - - - 2.3 MB 1.05
Xlsb_Sylvan 65536 88.69 ms 8.172 ms 2.122 ms 1.43 0.03 1166.6667 1000.0000 333.3333 17.38 MB 7.94
Xlsb_ExcelReader_Materialized 65536 78.92 ms 3.392 ms 0.881 ms 1.27 0.01 1000.0000 857.1429 285.7143 15.26 MB 6.97
Xlsb_ExcelReader_Materialized_Interned 65536 79.53 ms 3.158 ms 0.820 ms 1.28 0.01 1000.0000 857.1429 285.7143 15.27 MB 6.98
Xlsb_ExcelReader_Memory 65536 51.68 ms 1.296 ms 0.201 ms 0.83 0.00 - - - 6.47 MB 2.95

ExcelReader.Benchmarks.WriteBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio RatioSD Gen0 Gen1 Gen2 Allocated Alloc Ratio
ExcelReaderWriter 50000 15.643 ms 1.6883 ms 0.4385 ms 1.00 0.04 500.0000 500.0000 500.0000 4.02 MB 1.00
ExcelReaderWriterSharedStrings 50000 15.366 ms 0.4478 ms 0.0693 ms 0.98 0.03 500.0000 500.0000 500.0000 4.06 MB 1.01
ExcelReaderWriterPrefetch 50000 12.856 ms 2.0626 ms 0.5356 ms 0.82 0.04 484.3750 484.3750 484.3750 4.03 MB 1.00
ExcelReaderXlsbWriter 50000 10.400 ms 0.6271 ms 0.1629 ms 0.67 0.02 500.0000 500.0000 500.0000 4.02 MB 1.00
ExcelReaderXlsbWriterSharedStrings 50000 10.040 ms 0.6906 ms 0.1794 ms 0.64 0.02 500.0000 500.0000 500.0000 4.06 MB 1.01
ExcelReaderXlsbWriterPrefetch 50000 8.883 ms 0.3060 ms 0.0795 ms 0.57 0.02 484.3750 484.3750 484.3750 4.03 MB 1.00
OfficeIMO 50000 24.351 ms 0.6916 ms 0.1796 ms 1.56 0.04 312.5000 312.5000 312.5000 4.02 MB 1.00
SpreadCheetah 50000 20.761 ms 0.2317 ms 0.0602 ms 1.33 0.03 1437.5000 718.7500 718.7500 15.84 MB 3.94

ExcelReader.Benchmarks.WritePathBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Mean Error StdDev Allocated
NativeStrings_Xlsx 27.913 ms 0.1688 ms 0.0261 ms 18448 B
NativeStrings_Csv 7.250 ms 0.0460 ms 0.0071 ms 416 B
ArrowStrings_Xlsx 36.617 ms 0.2042 ms 0.0530 ms 18496 B
StyledRows_Xlsx 10.110 ms 0.3763 ms 0.0582 ms 18632 B

ExcelReader.Benchmarks.XlsReadBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 9V74 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v4

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio Gen0 Gen1 Allocated Alloc Ratio
ExcelReader 50000 3.827 ms 0.0085 ms 0.0022 ms 1.00 - - 2.45 KB 1.00
ExcelReaderAsync 50000 3.902 ms 0.0490 ms 0.0127 ms 1.02 - - 2.52 KB 1.03
Sylvan 50000 6.266 ms 0.1112 ms 0.0289 ms 1.64 101.5625 23.4375 1717.73 KB 700.22
OfficeIMO 50000 7.276 ms 0.0366 ms 0.0095 ms 1.90 640.6250 - 10499.25 KB 4,279.95

ExcelReader.Benchmarks.XlsWriteBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio Gen0 Gen1 Gen2 Allocated Alloc Ratio
XlsWriter 50000 7.852 ms 0.1202 ms 0.0312 ms 1.00 484.3750 484.3750 484.3750 16.03 MB 1.00
XlsxWriter 50000 16.101 ms 0.3310 ms 0.0859 ms 2.05 500.0000 500.0000 500.0000 4.02 MB 0.25

ExcelReader.Benchmarks.XlsxSharedStringHotPathBenchmark


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.401
  [Host]     : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.12 (10.0.12, 10.0.1226.42308), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Rows Mean Error StdDev Ratio RatioSD Allocated Alloc Ratio
EndToEnd 65536 66.059 ms 2.0276 ms 0.5266 ms 1.00 0.01 2294168 B 1.00
EndToEnd_Prefetch 65536 59.611 ms 20.0746 ms 5.2133 ms 0.90 0.07 2388616 B 1.04
SharedStringPrologue 65536 19.882 ms 0.0864 ms 0.0224 ms 0.30 0.00 773304 B 0.34
Stored_EndToEnd 65536 31.208 ms 0.2662 ms 0.0691 ms 0.47 0.00 2293088 B 1.00
Stored_SharedStringPrologue 65536 4.812 ms 0.0492 ms 0.0128 ms 0.07 0.00 772224 B 0.34
IndexParse_Utf8Parser 65536 3.165 ms 0.0249 ms 0.0065 ms 0.05 0.00 - 0.00
IndexParse_DigitLoop 65536 1.880 ms 0.0080 ms 0.0021 ms 0.03 0.00 - 0.00

@GabrielMarquezMatte
GabrielMarquezMatte merged commit fe522c5 into master Sep 30, 2026
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants