Commit e4bc02a
Add structured decoding (#79)
* Add DecodedStore for random-access decoding, complete from_store coverage
DecodedStore is a zero-allocation view into Indexed-encoded data that
provides O(1) random access to individual slices. from_store on
FromBytes uses it to give each field independent access at its
compile-time-known offset, eliminating the iterator dependency chain.
Assembly: accessing any field of any tuple width is now 49-54
instructions on the critical path, constant in both k (tuple width)
and field position. LLVM fully eliminates unused fields across all
type combinators: tuples, Results, Options, Vecs, Strings, and
arbitrary nesting.
Also adds from_u64s and from_store overrides to all remaining
FromBytes impls (Usizes, Isizes, Chars, U128s, I128s, Fixeds,
Strides, Empties, Bools, Durations) to ensure no leaf type breaks
the optimization chain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Remove from_u64s, decode_u64s, and from_byte_slices
These are superseded by from_store + DecodedStore which provides
random access without iterator overhead. The FromBytes trait now has
three methods beyond from_bytes: from_store, element_sizes, and
validate. The derive macro generates from_store automatically.
Also fixes references to the removed Indexed struct in doc comments.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 8f254ac commit e4bc02a
File tree
13 files changed
+206
-261
lines changed- columnar_derive/src
- examples
- src
13 files changed
+206
-261
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
| 326 | + | |
| 327 | + | |
337 | 328 | | |
338 | 329 | | |
339 | 330 | | |
| |||
520 | 511 | | |
521 | 512 | | |
522 | 513 | | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
530 | 518 | | |
531 | 519 | | |
532 | 520 | | |
| |||
910 | 898 | | |
911 | 899 | | |
912 | 900 | | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
| 901 | + | |
924 | 902 | | |
925 | | - | |
926 | | - | |
| 903 | + | |
| 904 | + | |
927 | 905 | | |
928 | 906 | | |
929 | 907 | | |
| |||
1216 | 1194 | | |
1217 | 1195 | | |
1218 | 1196 | | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
| 1197 | + | |
| 1198 | + | |
1225 | 1199 | | |
1226 | 1200 | | |
1227 | 1201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
| 41 | + | |
43 | 42 | | |
44 | | - | |
| 43 | + | |
| 44 | + | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | | - | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | | - | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
62 | | - | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
80 | 72 | | |
81 | 73 | | |
82 | | - | |
83 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
84 | 78 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
93 | 84 | | |
94 | 85 | | |
95 | 86 | | |
96 | 87 | | |
97 | 88 | | |
98 | | - | |
| 89 | + | |
99 | 90 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
| 64 | + | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| |||
0 commit comments