Commit 2a86d43
fix(vortex-onpair): remove redundant validate_codes pre-check
OnPair's own decoder already bounds-checks every code in-loop before
copying (a near-free, predicted-never-taken branch); vortex-onpair's
validate_codes was a second full pass over the codes buffer ahead of
decode, doubling memory traffic on a hot path for no additional
soundness (out-of-range codes still surface, as a panic instead of a
VortexResult error, matching the behavior prior to the onpair 0.1.0 port).
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 3da9528 commit 2a86d43
3 files changed
Lines changed: 4 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 94 | | |
99 | 95 | | |
100 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | 50 | | |
68 | 51 | | |
69 | 52 | | |
| |||
88 | 71 | | |
89 | 72 | | |
90 | 73 | | |
91 | | - | |
92 | | - | |
93 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
94 | 78 | | |
95 | 79 | | |
96 | 80 | | |
| |||
116 | 100 | | |
117 | 101 | | |
118 | 102 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | 103 | | |
124 | 104 | | |
125 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
| |||
0 commit comments