mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-07 03:01:32 +00:00
anchors_walk_dense_unrelated_markers_in_linear_work compared CPU times of a few microseconds, so cache and timer noise could push the ratio past its 24x limit on a linear walk (43.52x in a CI run). wordcraft-doc now counts, in tests only, the characters its paragraph object lookups walk (objects_before, object_offsets and objects_with_offsets), through a work::count helper behind the existing test-support feature. The test asserts that 8x the markers take at most 12x the steps, as the layout linear-time tests do: the walk takes 2001 -> 16001 steps (8.0x), and the object_offsets + object_at walk it replaced takes 2003001 -> 128024001 (63.9x).