The reference context-fit loop re-ran estimate_messages_tokens_rough on
head + body after every pop, paying one full memo walk per dropped
frame (O(n^2) on long histories). The estimator is a pure sum of
per-message weights, so weigh each message once, track a running
total, and subtract on pop. The pop sequence is unchanged and the trim
result is identical to the naive loop, pinned by a randomized
equivalence test against the original implementation plus an O(n)
estimator-call-count guard.
n=502 advisory frames trimmed to 106: 100.8ms -> 0.9ms per call.
cherry-picked-from: 226a8786f2cba9380be930d28604c81880d3f6f7