Repository navigation
table: keep dense lookup for wide messages - #517
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
[claude code] Thanks for this. The change is correct: the dense array is filled only for field numbers below 64, entries are sorted by field number, so such a field is at index 62 or lower and its index-plus-one always fits a It is on hold for ordering, not for content. It conflicts with the open table codec stack (#475 to #478) in
There is no action for you in the meantime. |
# Conflicts: # buffa/src/table/mod.rs
…message tests The generator converts a dense slot's index with u8::try_from and reports an overflow, which takes repeated field numbers, as a CodeGenError. A message with 255 fields or more now has a dense array, so the W254, W255 and W256 tests set the fields either side of its end (63 and 64), and two Table::new tests cover a dense array beside more than 255 entries. The comments that described the old rule are reworded. The table codec is unreleased, so the changelog fragment is removed.
|
[claude code] Thanks for this, the lookup change itself is unchanged. I pushed a merge of
|
What
Keep dense lookup for low field numbers in messages with 255 or more fields.
Why
Wide messages currently fall back to binary search for every field.
Implementation
Keep indices for fields below 64 in the dense lookup table.
Benchmark
Not applicable.