Skip to content

perf(ice): zi ice tokenizing is 20% slower since #527 #554

Description

@ss-o

Problem

An A/B on 2026-09-18 (fresh zsh -f per sample, alternating order, 3 warmups, 30 samples) between main 56715fd (v2.1.0) and next b4ab453 shows one case outside noise: 200 zi ice calls carrying 13 ices each take 151 ms on main and 182 ms on next, a +20.5% median regression, while every other case (source, light and tracked load, turbo queue plus burst, unload) is within ±1%. The change is #527: .zi-ice now consults ZI[nval-ice-list] and inspects the remainder for every matched word.

Absolute cost is about 0.15 ms per zi ice call, roughly +8 ms on a startup file with 50 ice calls, so this does not block the promotion; it is the kind of drift the benchmark suite (#553) exists to catch.

Expected behavior

The common case (a valued ice, or a bare no-value ice) stays on the previous path; the extra check runs only when a matched no-value ice name has a non-empty remainder. Measure per-word cost with the benchmark's ice case before and after.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ziZi core behavior, APIs, or documentation.performancePerformance-sensitive work or a measured regression in speed or memory.type:bugSomething is broken or behaving incorrectly.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions