Skip to content

Benchmarks: annotated generated rung, real-database parity and request journey - #268

Merged
electricessence merged 1 commit into
masterfrom
bench/gend-t
Nov 30, 2026
Merged

electricessence merged 1 commit into
masterfrom
bench/gend-t

Conversation

@electricessence

Copy link
Copy Markdown
Collaborator

GenRowDT10 and GenRowDT20 are the typed twins with every column's ordinal
declared, so their generated reader makes the same assumptions as a hand-written
selector: constant ordinals, nothing about the result checked. GenD_T measures
it on the synthetic reader and on the real databases, beside Gen_T (the same
twin without annotations) and the hand-written controls.

RealParityBenchmarks compares generated, hand-written and Dapper.AOT reads over
SQL Server and SQLite at widths 10 and 20 and 1, 1,000 and 10,000 rows. Its setup
compares every rung's rows before timing, and in a counters build requires the
generated rungs to be served by generated code.

Gen_T does not run on SQLite: SQLite stores a Guid as text, which the
generated reader of an unannotated model leaves to the runtime map, so that rung
would have measured the runtime map.

ControllerJourneyBenchmarks measures query, JSON response and release with
ToArrayAsync, ToPooledBuffer (awaiting Items or looping over
AsAsyncEnumerable()) and ToPooledBufferStream, checking every response.

🤖 Generated with Claude Code

…t journey

`GenRowDT10` and `GenRowDT20` are the typed twins with every column's ordinal
declared, so their generated reader makes the same assumptions as a hand-written
selector: constant ordinals, nothing about the result checked. `GenD_T` measures
it on the synthetic reader and on the real databases, beside `Gen_T` (the same
twin without annotations) and the hand-written controls.

`RealParityBenchmarks` compares generated, hand-written and Dapper.AOT reads over
SQL Server and SQLite at widths 10 and 20 and 1, 1,000 and 10,000 rows. Its setup
compares every rung's rows before timing, and in a counters build requires the
generated rungs to be served by generated code.

`Gen_T` does not run on SQLite: SQLite stores a `Guid` as text, which the
generated reader of an unannotated model leaves to the runtime map, so that rung
would have measured the runtime map.

`ControllerJourneyBenchmarks` measures query, JSON response and release with
`ToArrayAsync`, `ToPooledBuffer` (awaiting `Items` or looping over
`AsAsyncEnumerable()`) and `ToPooledBufferStream`, checking every response.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@electricessence
electricessence merged commit c03535b into master Nov 30, 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