From 2abb130757887eef9a87dc49de623431fb5efb08 Mon Sep 17 00:00:00 2001 From: Mihaela Mihaljevic Date: Thu, 25 Jun 2026 21:22:51 +0200 Subject: [PATCH] release: PureXML 0.4.4 (#304) Stamp the following/preceding axis quadratic fix as 0.4.4: those axes shared no state across context nodes, rebuilding and linearly searching the whole document node list on each, and materialized the entire span before the node test. They now share a per-evaluation document-order cache, skip the context subtree by index arithmetic, and fuse the node test into the walk. A 200-context following:: query over a 20k-element document drops ~16s to ~6s (~2.6x); results identical. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 450311e..0fbecf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.4.4] - 2026-06-25 + ### Fixed - The `following` and `preceding` axes no longer rebuild the whole document node list and linearly search it on every context node, which made them quadratic over many context nodes. They now share a per-evaluation cache of each document's ordered node list and a node-to-index map (the document does not change during evaluation), so the list is built once and a node's position is an O(1) lookup; `following` additionally skips the context's contiguous subtree by index arithmetic rather than filtering every descendant out. The step's node test is fused into the walk, so a node the test rejects is never copied out of the shared list (only the matches are materialized). The selected nodes and their order are unchanged. A 200-context `following::` query over a 20k-element document drops from about 16 s to about 6 s. Guarded by `FollowingPrecedingAxisTests`.