PureXML 0.4.4
following/preceding axis quadratic fix. Backward compatible, results identical.
Fixed
The following/preceding axes were quadratic over many context nodes: each call rebuilt the whole document node list and linearly searched it, then materialized the entire span before the node test filtered it (#302, #303). They now share a per-evaluation cache of the ordered node list and a node-to-index map, following:: skips the context's contiguous subtree by index arithmetic, and the node test is fused into the walk so only matches are materialized. A 200-context following:: query over a 20k-element document drops ~16s -> ~6s (~2.6x).
Verification
Full suite (1735 tests), the W3C XML conformance, RELAX NG, Apache Xalan XSLT gold-output, and C14N corpora, plus the WASM build, all green across macOS, Linux, and Windows. swiftformat and swiftlint --strict clean.
Full changelog: https://github.com/mihaelamj/PureXML/blob/main/CHANGELOG.md