vt: decode CSI parameter runs in a register #425
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!425
Loading…
Reference in a new issue
No description provided.
Delete branch "vt/faster-param-runs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #417.
Params::push_runfed every byte throughpush_digit/next_slot, so each digit reloadedlen, re-checked it, and did a saturating multiply on the slot in memory, reading back the previous digit's store. It now keeps the open slot's value and the slot count in registers and writes the slot once per separator and once at the end of the run (min(10v + d, u16::MAX)inu32is the same fold as the per-byte saturating ops). The bulk arm inadvancealso takes the first parameter byte inCsiEntry(digit or;; a leading:stays per-byte becausestart_emptyopens no subparam slot), saving oneadvance_byteround trip per CSI.Measurements
Floor bench
measure_parse_into_grid_floor, 35x106 (DOOM-fire capture geometry), median of 5 interleaved runs, load ~3,instructions:uover the bench's two passes:38;2/48;2)y\r\n)The sparse scroll floor is flat over 10 interleaved runs (96.9 vs 96.5 MiB/s median, cycles within 0.5%), so the accepted cost in cost-maps does not grow.
Rejected (numbers in the commit body and cost-maps): SWAR digit windows (+7% instructions on doom: SGR params are 1–3 digits), loading
values[0]on an empty list (store-forward block againstclear's zeroing store once per CSI), and a||-joined two-state guard (~8% csi cycles).Guards
push_run_equals_per_byte_primitives:push_runvspush_digit/next_slotover every 8-byte input (mutation-checked: a wrong clamp fails it).csi_param_runs_match_per_byte_dispatch_at_any_chunking: CSI-dense streams (long digit runs,:, >16 params, private markers, C0/CAN/ESC mid-sequence) cut at random chunk boundaries, wholeParserand dispatch log compared againstadvance_byte.vt_parserfuzz target 33M runs in 240 s clean;just checkgreen.Review
pi (sol) on
origin/main...HEAD: PASS, no findings.