Files
pandoc/benchmark
John MacFarlaneandClaude c606a847cb Shared: add stringifyInlines, a single-pass stringify for inlines.
`stringify` does a full tree rebuild (`walk fixInlines`) before
querying, and discards `Note` contents only after rebuilding them.
The new `stringifyInlines :: Foldable t => t Inline -> Text` produces
the same result in a single pass with no rebuild; in a new benchmark
it is about 6x faster on a large inline sequence.  Use it in
`inlineListToIdentifier`, `figureDiv`, and `formatCode`.

Also make `stringify` accumulate `[Text]` and concatenate once at the
end, instead of mappending `Text` at every node, and add a QuickCheck
property verifying that `stringifyInlines` agrees with `stringify`.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-03 13:35:38 -07:00
..