perf: cache widths, reuse buffers
Text docs keep their width, so fits no longer measures the same text again and again, and tracks trailing whitespace only when a doc has a trim. fits reuses one stack, texts that are part of the source are borrowed instead of copied, and the arena and output reserve room up front. Pages on one thread: 111 to 82 ms. Adds the CLI, bench/run.ts, and its markup_fmt and @lukeed/html helpers.
Parent13267a2
15 files changed+633-32
StackedSplit