Skip to content

Native library on .NET 11, faster XLS reads and short ASCII strings, refreshed benchmarks - #185

Merged
GabrielMarquezMatte merged 22 commits into
masterfrom
develop
Nov 16, 2026
Merged

GabrielMarquezMatte merged 22 commits into
masterfrom
develop

Conversation

@GabrielMarquezMatte

Copy link
Copy Markdown
Owner

Summary

develop is 13 commits ahead of master. The main changes:

  • Native library built on .NET 11. ExcelReader.Native now targets net10.0;net11.0 and the NativeAOT library ships from net11.0. Core, Arrow and the NuGet packages stay on net10.0. The net10.0 Native build only exists for the tests and benchmarks that reference its managed layer. The static PGO profile was regenerated on the .NET 11 runtime.
  • Faster XLS reads. While a row is open, NUMBER, RK, MULRK and LABELSST records go straight into the cell array. Any other record falls back to ReadRecord as before.
  • Short ASCII cell text in one step. Values of 1 to 15 bytes are checked and widened without a separate validation pass. Single ASCII characters come from a fixed table.
  • Static PGO profile now also trains on the XLS fixture.
  • Benchmark tables refreshed from one --job Medium run of the whole suite (.NET 10.0.14, BenchmarkDotNet 0.16.0-preview.2). Before, the tables mixed Short and Medium runs.
  • Dependencies. NetAnalyzers 11.0.100, Meziantou.Analyzer 3.0.325, xunit.v3.mtp-v2 4.0.3, TrxReport 2.5.3, ConsoleAppFramework 5.8.1. For Rust: calamine 0.38.0 and cc 1.11.1. Benchmark competitors: OfficeIMO.Excel 3.6.1 (moved to its CreateWriter/WriteTable API) and Sep 0.18.0.

Performance

65K × 14 fixtures, medians:

Path Before After
XLS read, from a file — -17%
XLS read, from memory — -18% to -25%
CSV, every string read (JIT with PGO) 17.9 ms 15.2 ms
Native xl_parse_typed, .NET 11 vs .NET 10 (NativeAOT, win-x64) — about -4% to -5% on average

.NET 11 results per format: XLSB -6% to -7%, CSV parallel -10%, XLSX -3%, CSV sequential unchanged.

The native tables in docs/performance/benchmarks.md were measured before the .NET 11 switch.

Behavior changes

  • None in the API or ABI. No public API was added or changed, and include/excelreader.h is unchanged. The NativeAOT library carries its own runtime, so C, C++, Rust and Python users don't need .NET 11 installed.
  • Building from source needs the .NET 11 SDK. global.json now pins SDK 11.0.100. python/scripts/build_native.py publishes -f net11.0, and the musl build uses sdk:11.0-alpine. CI jobs that run net10 code also install the 10.0.x runtime.
  • Two new SDK 11 analyzer findings. CA1517 is suppressed in SchemaInference because it is a false positive on a foreach ref loop. CA1877 is fixed in the .NET Framework test fixtures.

GabrielMarquezMatte and others added 19 commits November 9, 2026 01:51
…-api-v7.5.0

chore: promote public API for v7.5.0
…on pass

Values of 1 to 15 bytes load their first and last word, check them for
non-ASCII bytes and widen them straight into the new string; single ASCII
characters come from a fixed table. Longer or non-ASCII text keeps the
existing path. Reading every string of the 65K CSV drops from 17.9 to
15.2 ms (median, Ryzen 7 5700X, JIT with PGO).
…ell array

While a row is open, NUMBER, RK, MULRK and LABELSST records of that row are
read from the cursor's already-loaded bytes and written into the cell array
directly. Any other record, a short payload, a full cell array or a column
past the limit stops the drain and goes through ReadRecord as before.
65K XLS read: -17% from a file, -18..25% from memory.
Rerun the whole BenchmarkDotNet suite with --job Medium on .NET 10.0.14
and BenchmarkDotNet 0.16.0-preview.2, replacing the mix of Short,
Medium and five-launch Short figures. Ratios and prose follow the new
numbers, and the guides' prefetch and parallel-write tables match.
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.10.0 to 1.11.1.
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](rust-lang/cc-rs@cc-v1.10.0...cc-v1.11.1)

---
updated-dependencies:
- dependency-name: cc
  dependency-version: 1.11.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [calamine](https://github.com/tafia/calamine) from 0.37.0 to 0.38.0.
- [Release notes](https://github.com/tafia/calamine/releases)
- [Changelog](https://github.com/tafia/calamine/blob/master/Changelog.md)
- [Commits](tafia/calamine@v0.37.0...v0.38.0)

---
updated-dependencies:
- dependency-name: calamine
  dependency-version: 0.38.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps Meziantou.Analyzer from 3.0.320 to 3.0.325
Bumps Microsoft.CodeAnalysis.NetAnalyzers from 10.0.403 to 11.0.100

---
updated-dependencies:
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.325
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: analyzers
- dependency-name: Microsoft.CodeAnalysis.NetAnalyzers
  dependency-version: 11.0.100
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: analyzers
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps Microsoft.Testing.Extensions.TrxReport from 2.5.2 to 2.5.3
Bumps xunit.v3.mtp-v2 from 4.0.2 to 4.0.3

---
updated-dependencies:
- dependency-name: Microsoft.Testing.Extensions.TrxReport
  dependency-version: 2.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test
- dependency-name: Microsoft.Testing.Extensions.TrxReport
  dependency-version: 2.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test
- dependency-name: xunit.v3.mtp-v2
  dependency-version: 4.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test
- dependency-name: xunit.v3.mtp-v2
  dependency-version: 4.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test
...

Signed-off-by: dependabot[bot] <[email protected]>
---
updated-dependencies:
- dependency-name: ConsoleAppFramework
  dependency-version: 5.8.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
…t/develop/cc-1.11.1

chore(deps): bump cc from 1.10.0 to 1.11.1 in /rust
…elop/analyzers-8e3e5a4533

Bump the analyzers group with 2 updates
…t/develop/calamine-0.38.0

chore(deps): bump calamine from 0.37.0 to 0.38.0 in /rust
…/ExcelReader.Cli/develop/ConsoleAppFramework-5.8.1

Bump ConsoleAppFramework from 5.8.0 to 5.8.1
…ts/ExcelReader.NetFramework.Tests/develop/test-61aca8624b

Bump the test group with 2 updates
ExcelReader.Native now targets net10.0;net11.0 and the AOT library is
published from net11.0. Core, Arrow and the NuGet surface stay on net10.0,
and the net10.0 Native build only exists for the net10 tests and
benchmarks that reference the managed *Api layer.

Interleaved A/B of xl_parse_typed over the 65K fixtures (win-x64, Python
binding) put net11 about 4-5% faster on average, with csv p1 flat. The
static PGO profile was regenerated with the trainer on net11; the old
profile under net11 cost xlsx p1 ~6%.

- global.json: SDK 11.0.100; CI jobs that run net10 code also install
  the 10.0.x runtime
- build_native.py publishes -f net11.0; musl build uses sdk:11.0-alpine
- CA1517 (false positive on a foreach ref loop) suppressed, CA1877 fixed
@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.24561% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.37%. Comparing base (5b1223a) to head (d0a922c).
⚠️ Report is 23 commits behind head on master.

Files with missing lines Patch % Lines
src/ExcelReader.Core/Reader/Xls/BiffCursor.cs 80.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #185      +/-   ##
==========================================
- Coverage   92.44%   92.37%   -0.07%     
==========================================
  Files         302      302              
  Lines       25381    25526     +145     
  Branches     4161     4194      +33     
==========================================
+ Hits        23463    23580     +117     
- Misses       1298     1321      +23     
- Partials      620      625       +5     
Flag Coverage Δ
cpp 88.77% <ø> (-0.18%) ⬇️
csharp 92.27% <98.24%> (+0.02%) ⬆️
python 96.26% <ø> (ø)
rust 92.61% <ø> (-0.69%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@GabrielMarquezMatte
GabrielMarquezMatte merged commit cc98179 into master Nov 16, 2026
47 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.

1 participant