Repository navigation
Commit f4ecdfe
Make the two allocation tests deterministic: read their rows from the existing TypedReader (#136)
* Read the allocation tests' rows from arrays, so the fixture no longer boxes an int per row
The two allocation tests compared bytes measured back to back through a
DataTableReader, whose GetInt32 boxes each value (24 B per row). Tiered JIT
removes that box part way through a measurement, so one side of a comparison
could be 24 B per row cheaper than the other and the test failed at random.
An ArrayReader serves typed getters straight from int[]/long[]/string[], so the
measured bytes are the library's own at every tier. The thresholds, the
warm-up and the tests' claims are unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Use the existing TypedReader for the allocation tests' rows and drop ArrayReader
TypedReader already serves typed getters over cells boxed once when the rows
are built, so a row read allocates nothing; ArrayReader duplicated it. Ints
and Rows now build a TypedReader. Thresholds and assertions are unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>1 parent 566f17f commit f4ecdfe
2 files changed
Lines changed: 13 additions & 10 deletions
File tree
- Tests/Open.Database.Extensions.Core.Tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
974 | 974 | | |
975 | 975 | | |
976 | 976 | | |
977 | | - | |
978 | | - | |
979 | | - | |
980 | | - | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
981 | 983 | | |
982 | 984 | | |
983 | 985 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
0 commit comments