Repository navigation
Validate VarBin arrays with an explicit execution context - #10593
Conversation
471c088 to
b473671
Compare
7281c06 to
8105637
Compare
|
codex found some stray cfg debug assertions (and also there is a merge conflict now) |
The VarBin constructors validated offsets and UTF-8 data, and `offset_at`, `bytes_at` and `sliced_bytes` read offsets, with the hidden global `legacy_session()`. Take an `ExecutionCtx` instead, and validate during deserialization with a context from the session. The VarBin and FSST nullability casts rebuild unchanged offsets and bytes with `new_unchecked_from_handle` instead of revalidating them. Signed-off-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y1zHpE1K1Y9HvyU4kt24Tq
8105637 to
cbb2829
Compare
Merging this PR will regress 5 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | decode_primitives[i64, (1000, 8)] |
24.7 µs | 37.4 µs | -34% |
| ❌ | WallTime | threshold_neon[8] |
1.8 µs | 2.6 µs | -30.67% |
| ❌ |
Simulation | test_scan_scalar_at[int] |
785.2 µs | 929.1 µs | -15.49% |
| ❌ ℹ️ | Simulation | test_scan_filter[int] |
3 ms | 3.4 ms | -10.84% |
| ❌ | WallTime | words_gather_dispatch_neon[65536] |
1.8 µs | 2 µs | -10.17% |
| ⚡ |
Simulation | test_repeated_scan_scalar_at[int_str] |
832.5 µs | 424.5 µs | +96.15% |
| ⚡ | WallTime | filter_neon[8] |
1,755 ns | 911 ns | +92.65% |
| ⚡ | WallTime | filter_neon[64] |
2.5 µs | 1.8 µs | +39.89% |
| ⚡ | WallTime | filter_neon[80] |
3.1 µs | 2.6 µs | +20.46% |
| ⚡ |
Simulation | bench_compare_sliced_dict_primitive[(2000, 10000)] |
78.8 µs | 68.6 µs | +14.89% |
| ⚡ | WallTime | threshold_avx512[80] |
2.8 µs | 2.5 µs | +10.88% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing rk/legacy-session-varbin (cbb2829) with develop (3bf14ba)
Footnotes
-
12 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
43 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them. ↩
ExecutionCtxto validate offsets and UTF-8 data. This coversVarBinArray::{new, try_new}andVarBinData::{build, build_from_handle, try_build, try_build_from_handle, validate}.from_utf8_unchecked.offset_at,bytes_atandsliced_bytestake a ctx.new_unchecked_from_handleinstead of revalidating.part of #9446