Skip to content

Benchmarks: per-read-mode gate tables; hand loops read with default access - #270

Merged
electricessence merged 1 commit into
masterfrom
bench/gate
Dec 1, 2026
Merged

electricessence merged 1 commit into
masterfrom
bench/gate

Conversation

@electricessence

Copy link
Copy Markdown
Collaborator

New gate benchmarks (GateBenchmarks.cs), run out of process on .NET 11:

  • One table per read mode, every rung of a table reading in that mode, over the synthetic reader, SQLite and SQL Server LocalDB; widths 10 and 20; 1, 1,000 and 10,000 rows. Each case runs in processes of its own, three launches, the shapes and the rungs within each shuffled, with a 2% Mann-Whitney verdict against the hand-written baseline. A process sets up and runs only its own rung, with plain ADO.NET as the oracle, because other rungs run first would change how the shared read loop is optimised.
  • Rungs: the hand-written reader (baseline), a separately compiled copy of it (A/A control), the generated reader of the annotated and the unannotated model, the selector, Dapper.AOT and Dapper. Dapper and Dapper.AOT are forced into default access in that table and labelled so.
  • A bench-only connection wrapper forces the mode for every rung alike, and each process's setup checks its rows and mode. --verify-gate runs every rung of every case.
  • A separate table shows what the read mode itself costs, path by path.

The older hand loops now read with default access, as the library does. The plain read loop hands every value it reads to BenchmarkDotNet's keep-alive call, so the JIT cannot drop reads.

BenchmarkDotNet 0.15.8 does not know .NET 11, so the job names .NET 10 for its checks while the toolchain builds and runs net11.0; each process prints the runtime it runs on.

🤖 Generated with Claude Code

…ccess

New gate benchmarks (`GateBenchmarks.cs`), run out of process on .NET 11:

- One table per read mode, every rung of a table reading in that mode, over the synthetic reader, SQLite and SQL Server LocalDB; widths 10 and 20; 1, 1,000 and 10,000 rows. Each case runs in processes of its own, three launches, the shapes and the rungs within each shuffled, with a 2% Mann-Whitney verdict against the hand-written baseline. A process sets up and runs only its own rung, with plain ADO.NET as the oracle, because other rungs run first would change how the shared read loop is optimised.
- Rungs: the hand-written reader (baseline), a separately compiled copy of it (A/A control), the generated reader of the annotated and the unannotated model, the selector, Dapper.AOT and Dapper. Dapper and Dapper.AOT are forced into default access in that table and labelled so.
- A bench-only connection wrapper forces the mode for every rung alike, and each process's setup checks its rows and mode. `--verify-gate` runs every rung of every case.
- A separate table shows what the read mode itself costs, path by path.

The older hand loops now read with default access, as the library does. The plain read loop hands every value it reads to BenchmarkDotNet's keep-alive call, so the JIT cannot drop reads.

BenchmarkDotNet 0.15.8 does not know .NET 11, so the job names .NET 10 for its checks while the toolchain builds and runs net11.0; each process prints the runtime it runs on.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@electricessence
electricessence merged commit 37618ad into master Dec 1, 2026
10 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