|
| 1 | +<!-- Generated by docsite/tools/perf/New-PerfCharts.ps1 from docsite/perf-data/*.csv. Do not edit by hand. --> |
| 2 | +# Performance data |
| 3 | + |
| 4 | +The numbers behind every chart on [Performance](performance.md), as tables. Each section gives the same numbers as the CSV file next to it, which you can download, and a source file that names the benchmark, the build, the date, the machine and the conditions, and the result file each number came from. The tables and the charts are generated from the CSV files by one script, so nothing here is typed by hand. |
| 5 | + |
| 6 | +## How fresh the data is |
| 7 | + |
| 8 | +Each data set comes from one BenchmarkDotNet run (or a few runs of the same build). The build is the commit of the benchmark project that was run; the date is when the run finished. |
| 9 | + |
| 10 | +| Data | Charts | Build | Run date | Machine | Runtime | |
| 11 | +|---|---|---|---|---|---| |
| 12 | +| `synthetic-overhead.csv` | headline ratios, reader-open time, total time, memory | `b27a02f` | 2026-11-14 | AMD Ryzen 9 7900 3.70GHz, 1 CPU, 24 logical and 12 physical cores | .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v4 | |
| 13 | +| `width-sweep.csv` | cost grows with columns | `b27a02f` | 2026-11-14 | AMD Ryzen 9 7900 3.70GHz, 1 CPU, 24 logical and 12 physical cores | .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v4 | |
| 14 | +| `map-cost.csv` | what building a map costs | `544cc01` | 2026-11-14 | AMD Ryzen 9 7900 3.70GHz, 1 CPU, 24 logical and 12 physical cores | .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v4 | |
| 15 | +| `real-providers.csv` | real databases | `fbb13d7` | 2026-11-14 | AMD Ryzen 9 7900 3.70GHz, 1 CPU, 24 logical and 12 physical cores | .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v4 | |
| 16 | +| `sync-async.csv` | sync against async reads | `ea5f096` | 2026-11-14 | AMD Ryzen 9 7900 3.70GHz, 1 CPU, 24 logical and 12 physical cores | .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v4 | |
| 17 | + |
| 18 | +<a id="headline"></a> |
| 19 | +## Headline ratios |
| 20 | + |
| 21 | +[Back to the chart](performance.md#headline). Each ratio divides two numbers of the table [Reader-open time](#open-time) or [Memory allocated](#memory). |
| 22 | + |
| 23 | +| Ratio | Value | Computed from | |
| 24 | +|---|---:|---| |
| 25 | +| Dapper reader-open time over the RowMap plan | 2.48× | 202.4 µs / 81.6 µs | |
| 26 | +| Dapper allocation over the RowMap plan | 2.41× | 548.1 KB / 227.4 KB | |
| 27 | +| object[] rows reader-open time over the RowMap plan | 2.19× | 178.4 µs / 81.6 µs | |
| 28 | +| RowMap plan reader-open time over the hand-written selector | 1.74× | 81.6 µs / 46.8 µs | |
| 29 | + |
| 30 | +Data: [synthetic-overhead.csv](../perf-data/synthetic-overhead.csv) ([source and conditions](../perf-data/synthetic-overhead.source.txt)). |
| 31 | + |
| 32 | +<a id="open-time"></a> |
| 33 | +## Reader-open time |
| 34 | + |
| 35 | +[Back to the chart](performance.md#open-time). Mean time from ExecuteReader until the reader closes, 20 columns, 1,000 rows, synthetic reader. Build b27a02f, 2026-11-14. |
| 36 | + |
| 37 | +| Rank | Variant | Family | Reader open (µs) | Against the best | |
| 38 | +|---:|---|---|---:|---:| |
| 39 | +| 1 | Map(selector), hand-written | ODX: one object per row | 46.8 | best | |
| 40 | +| 2 | Selector, reused row, Select | ODX: one object per row | 58.8 | +25.6% | |
| 41 | +| 3 | Selector, pooled row, Select | ODX: one object per row | 62.8 | +34.2% | |
| 42 | +| 4 | Shaping inside the selector | ODX: one object per row | 67.6 | +44.4% | |
| 43 | +| 5 | Map<T>(), the RowMap plan | ODX: one object per row | 81.6 | +74.3% | |
| 44 | +| 6 | Row class, close, then Select | ODX: row class, then Select | 82.1 | +75.5% | |
| 45 | +| 7 | Row class, shaping after close | ODX: row class, then Select | 82.3 | +75.7% | |
| 46 | +| 8 | Row class, inline Select | ODX: row class, then Select | 106.4 | +127.3% | |
| 47 | +| 9 | Row class, shaping in Select | ODX: row class, then Select | 138.9 | +196.7% | |
| 48 | +| 10 | object[] rows, objects later | ODX: raw object[] rows | 170.1 | +263.4% | |
| 49 | +| 11 | object[] rows (baseline) | ODX: raw object[] rows | 178.4 | +281.0% | |
| 50 | +| 12 | Dapper, then Select after | Dapper 2.1.89 | 197.5 | +321.8% | |
| 51 | +| 13 | Dapper, shaping after | Dapper 2.1.89 | 200.5 | +328.2% | |
| 52 | +| 14 | Dapper Query<T> | Dapper 2.1.89 | 202.4 | +332.3% | |
| 53 | +| 15 | Dapper, inline Select | Dapper 2.1.89 | 214.0 | +357.0% | |
| 54 | +| 16 | Dapper, shaping in Select | Dapper 2.1.89 | 257.6 | +450.2% | |
| 55 | + |
| 56 | +Data: [synthetic-overhead.csv](../perf-data/synthetic-overhead.csv) ([source and conditions](../perf-data/synthetic-overhead.source.txt)). |
| 57 | + |
| 58 | +<a id="total-time"></a> |
| 59 | +## Total time per call |
| 60 | + |
| 61 | +[Back to the chart](performance.md#total-time). Mean time of the whole call, same runs as above. Build b27a02f, 2026-11-14. |
| 62 | + |
| 63 | +| Rank | Variant | Family | Total (µs) | Against the best | |
| 64 | +|---:|---|---|---:|---:| |
| 65 | +| 1 | Map(selector), hand-written | ODX: one object per row | 47.0 | best | |
| 66 | +| 2 | Selector, reused row, Select | ODX: one object per row | 59.0 | +25.7% | |
| 67 | +| 3 | Selector, pooled row, Select | ODX: one object per row | 63.1 | +34.3% | |
| 68 | +| 4 | Shaping inside the selector | ODX: one object per row | 67.8 | +44.3% | |
| 69 | +| 5 | Map<T>(), the RowMap plan | ODX: one object per row | 81.7 | +74.1% | |
| 70 | +| 6 | Row class, close, then Select | ODX: row class, then Select | 97.8 | +108.3% | |
| 71 | +| 7 | Row class, inline Select | ODX: row class, then Select | 106.7 | +127.1% | |
| 72 | +| 8 | Row class, shaping after close | ODX: row class, then Select | 134.5 | +186.4% | |
| 73 | +| 9 | Row class, shaping in Select | ODX: row class, then Select | 139.2 | +196.4% | |
| 74 | +| 10 | object[] rows (baseline) | ODX: raw object[] rows | 178.5 | +280.1% | |
| 75 | +| 11 | Dapper Query<T> | Dapper 2.1.89 | 202.7 | +331.6% | |
| 76 | +| 12 | Dapper, inline Select | Dapper 2.1.89 | 214.3 | +356.3% | |
| 77 | +| 13 | Dapper, then Select after | Dapper 2.1.89 | 217.1 | +362.4% | |
| 78 | +| 14 | object[] rows, objects later | ODX: raw object[] rows | 221.0 | +370.7% | |
| 79 | +| 15 | Dapper, shaping after | Dapper 2.1.89 | 256.2 | +445.6% | |
| 80 | +| 16 | Dapper, shaping in Select | Dapper 2.1.89 | 257.9 | +449.2% | |
| 81 | + |
| 82 | +Data: [synthetic-overhead.csv](../perf-data/synthetic-overhead.csv) ([source and conditions](../perf-data/synthetic-overhead.source.txt)). |
| 83 | + |
| 84 | +<a id="memory"></a> |
| 85 | +## Memory allocated per call |
| 86 | + |
| 87 | +[Back to the chart](performance.md#memory). Bytes allocated per call divided by 1,024, same runs as above. Build b27a02f, 2026-11-14. |
| 88 | + |
| 89 | +| Rank | Variant | Family | Allocated (KB) | Against the best | |
| 90 | +|---:|---|---|---:|---:| |
| 91 | +| 1 | Map<T>(), the RowMap plan | ODX: one object per row | 227.4 | best | |
| 92 | +| 2 | Map(selector), hand-written | ODX: one object per row | 227.4 | +0.0% | |
| 93 | +| 3 | Selector, reused row, Select | ODX: one object per row | 228.1 | +0.3% | |
| 94 | +| 4 | Selector, pooled row, Select | ODX: one object per row | 228.2 | +0.4% | |
| 95 | +| 5 | Shaping inside the selector | ODX: one object per row | 297.7 | +30.9% | |
| 96 | +| 6 | Row class, inline Select | ODX: row class, then Select | 438.7 | +92.9% | |
| 97 | +| 7 | Row class, close, then Select | ODX: row class, then Select | 446.3 | +96.3% | |
| 98 | +| 8 | Row class, shaping in Select | ODX: row class, then Select | 509.1 | +123.9% | |
| 99 | +| 9 | object[] rows (baseline) | ODX: raw object[] rows | 516.6 | +127.2% | |
| 100 | +| 10 | Row class, shaping after close | ODX: row class, then Select | 516.7 | +127.2% | |
| 101 | +| 11 | Dapper Query<T> | Dapper 2.1.89 | 548.1 | +141.0% | |
| 102 | +| 12 | object[] rows, objects later | ODX: raw object[] rows | 735.4 | +223.4% | |
| 103 | +| 13 | Dapper, inline Select | Dapper 2.1.89 | 759.0 | +233.8% | |
| 104 | +| 14 | Dapper, then Select after | Dapper 2.1.89 | 767.0 | +237.3% | |
| 105 | +| 15 | Dapper, shaping in Select | Dapper 2.1.89 | 829.3 | +264.7% | |
| 106 | +| 16 | Dapper, shaping after | Dapper 2.1.89 | 837.4 | +268.2% | |
| 107 | + |
| 108 | +Data: [synthetic-overhead.csv](../perf-data/synthetic-overhead.csv) ([source and conditions](../perf-data/synthetic-overhead.source.txt)). |
| 109 | + |
| 110 | +<a id="width"></a> |
| 111 | +## Cost grows with the number of columns |
| 112 | + |
| 113 | +[Back to the chart](performance.md#width). Total time per call (µs) at 1,000 rows. The last column is the cost of one more cell: the time at the widest result minus the time at the narrowest, divided by the cells added. Build b27a02f, 2026-11-14. |
| 114 | + |
| 115 | +| Approach | 1 columns | 3 columns | 5 columns | 10 columns | 20 columns | Per added cell (ns) | |
| 116 | +|---|---:|---:|---:|---:|---:|---:| |
| 117 | +| Map(selector), hand-written | 10.7 | 11.9 | 16.8 | 31.2 | 47.0 | 1.91 | |
| 118 | +| Map<T>(), the RowMap plan | 12.4 | 18.3 | 25.2 | 49.1 | 81.7 | 3.65 | |
| 119 | +| Row class, inline Select | 28.3 | 32.4 | 41.4 | 67.2 | 106.7 | 4.12 | |
| 120 | +| object[] rows (baseline) | 9.5 | 20.0 | 35.9 | 75.7 | 178.5 | 8.90 | |
| 121 | +| Dapper Query<T> | 18.5 | 31.1 | 44.6 | 96.2 | 202.7 | 9.70 | |
| 122 | + |
| 123 | +Data: [width-sweep.csv](../perf-data/width-sweep.csv) ([source and conditions](../perf-data/width-sweep.source.txt)). |
| 124 | + |
| 125 | +<a id="map-cost"></a> |
| 126 | +## What building a map costs |
| 127 | + |
| 128 | +[Back to the chart](performance.md#map-cost). One row per call. The one-time cost is the time (and memory) of a call that builds and compiles a new map, minus a call that reuses the cached one. Build 544cc01, 2026-11-14. |
| 129 | + |
| 130 | +| Columns | Reused map (µs) | Map built every call (ms) | One-time cost (ms) | Reused map (KB) | Built every call (KB) | One-time memory (KB) | |
| 131 | +|---:|---:|---:|---:|---:|---:|---:| |
| 132 | +| 1 | 0.17 | 0.19 | 0.19 | 0.55 | 15.6 | 15.1 | |
| 133 | +| 5 | 0.19 | 0.33 | 0.33 | 0.55 | 22.9 | 22.4 | |
| 134 | +| 20 | 0.27 | 0.88 | 0.87 | 0.55 | 52.0 | 51.5 | |
| 135 | + |
| 136 | +Data: [map-cost.csv](../perf-data/map-cost.csv) ([source and conditions](../perf-data/map-cost.source.txt)). |
| 137 | + |
| 138 | +<a id="real-time"></a> |
| 139 | +## Real databases: time per call |
| 140 | + |
| 141 | +[Back to the chart](performance.md#real-time). 20 columns, 10,000 rows. The CSV also holds the 5-column runs of the same benchmark. Build fbb13d7, 2026-11-14. |
| 142 | + |
| 143 | +### SQL Server LocalDB |
| 144 | + |
| 145 | +| Rank | Variant | Family | Time (ms) | Against the best | |
| 146 | +|---:|---|---|---:|---:| |
| 147 | +| 1 | Map(selector), hand-written | ODX: one object per row | 25.18 | best | |
| 148 | +| 2 | Hand loop (reference) | Hand loop on the provider reader (reference) | 25.59 | +1.7% | |
| 149 | +| 3 | Map<T>(), the RowMap plan | ODX: one object per row | 25.90 | +2.9% | |
| 150 | +| 4 | Row class, inline Select | ODX: row class, then Select | 27.24 | +8.2% | |
| 151 | +| 5 | Dapper Query<T> | Dapper 2.1.89 | 27.57 | +9.5% | |
| 152 | + |
| 153 | +### SQLite file |
| 154 | + |
| 155 | +| Rank | Variant | Family | Time (ms) | Against the best | |
| 156 | +|---:|---|---|---:|---:| |
| 157 | +| 1 | Map(selector), hand-written | ODX: one object per row | 25.90 | best | |
| 158 | +| 2 | Hand loop (reference) | Hand loop on the provider reader (reference) | 25.92 | +0.1% | |
| 159 | +| 3 | Dapper Query<T> | Dapper 2.1.89 | 29.78 | +15.0% | |
| 160 | +| 4 | Row class, inline Select | ODX: row class, then Select | 30.90 | +19.3% | |
| 161 | +| 5 | Map<T>(), the RowMap plan | ODX: one object per row | 31.30 | +20.9% | |
| 162 | + |
| 163 | +Data: [real-providers.csv](../perf-data/real-providers.csv) ([source and conditions](../perf-data/real-providers.source.txt)). |
| 164 | + |
| 165 | +<a id="real-memory"></a> |
| 166 | +## Real databases: memory per call |
| 167 | + |
| 168 | +[Back to the chart](performance.md#real-memory). 20 columns, 10,000 rows. The CSV also holds the 5-column runs of the same benchmark. Build fbb13d7, 2026-11-14. |
| 169 | + |
| 170 | +### SQL Server LocalDB |
| 171 | + |
| 172 | +| Rank | Variant | Family | Allocated (KB) | Against the best | |
| 173 | +|---:|---|---|---:|---:| |
| 174 | +| 1 | Hand loop (reference) | Hand loop on the provider reader (reference) | 9,708.2 | best | |
| 175 | +| 2 | Map<T>(), the RowMap plan | ODX: one object per row | 9,708.4 | +0.0% | |
| 176 | +| 3 | Map(selector), hand-written | ODX: one object per row | 9,708.4 | +0.0% | |
| 177 | +| 4 | Row class, inline Select | ODX: row class, then Select | 11,818.1 | +21.7% | |
| 178 | +| 5 | Dapper Query<T> | Dapper 2.1.89 | 12,561.5 | +29.4% | |
| 179 | + |
| 180 | +### SQLite file |
| 181 | + |
| 182 | +| Rank | Variant | Family | Allocated (KB) | Against the best | |
| 183 | +|---:|---|---|---:|---:| |
| 184 | +| 1 | Hand loop (reference) | Hand loop on the provider reader (reference) | 12,250.3 | best | |
| 185 | +| 2 | Map(selector), hand-written | ODX: one object per row | 12,250.7 | +0.0% | |
| 186 | +| 3 | Map<T>(), the RowMap plan | ODX: one object per row | 14,448.5 | +17.9% | |
| 187 | +| 4 | Dapper Query<T> | Dapper 2.1.89 | 15,144.2 | +23.6% | |
| 188 | +| 5 | Row class, inline Select | ODX: row class, then Select | 16,558.3 | +35.2% | |
| 189 | + |
| 190 | +Data: [real-providers.csv](../perf-data/real-providers.csv) ([source and conditions](../perf-data/real-providers.source.txt)). |
| 191 | + |
| 192 | +<a id="sync-async"></a> |
| 193 | +## Sync reads against async reads |
| 194 | + |
| 195 | +[Back to the chart](performance.md#sync-async). Reader-open time (µs), RowMap plan, 20 columns, 1,000 rows. Buffer refills: every 100 rows the reader waits 20 µs. Busy pool: 8 work items kept queued on the thread pool. Build ea5f096, 2026-11-14. |
| 196 | + |
| 197 | +| Condition | Sync | Async execute | Async read | Async read against sync | |
| 198 | +|---|---:|---:|---:|---:| |
| 199 | +| Neither | 77.3 µs | 80.9 µs | 82.3 µs | 1.07× | |
| 200 | +| Busy thread pool | 94.4 µs | 97.4 µs | 102.4 µs | 1.08× | |
| 201 | +| Buffer refills | 257.9 µs | 261.2 µs | 314.3 µs | 1.22× | |
| 202 | +| Refills and busy pool | 279.3 µs | 279.0 µs | 11.2 ms | 40.01× | |
| 203 | + |
| 204 | +Data: [sync-async.csv](../perf-data/sync-async.csv) ([source and conditions](../perf-data/sync-async.source.txt)). |
0 commit comments