mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-10 04:09:53 -06: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).
29 lines
850 B
TOML
29 lines
850 B
TOML
[package]
|
|
name = "wordcraft-doc"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "WordCraft document model: stories, paragraphs, runs, tables, sections, styles, numbering, fields, notes, comments, revisions; edit primitives"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
# Test inputs other crates' tests share (`cfb_guard::repeating_difat_sample`,
|
|
# `zip_guard::zip64_entry_count_sample`) and the step count of
|
|
# `work::count`; turned on only as a dev-dependency, so never built into
|
|
# the app.
|
|
test-support = []
|
|
|
|
[dependencies]
|
|
wordcraft-geom = { workspace = true }
|
|
base64 = { workspace = true }
|
|
log = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
unicode-segmentation = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
proptest = { workspace = true }
|