From 8abaf570bc546e845820498c450ffe61a0dcf277 Mon Sep 17 00:00:00 2001 From: Mihaela Mihaljevic Date: Thu, 25 Jun 2026 19:15:10 +0200 Subject: [PATCH] release: PureXML 0.4.3 (#301) Stamp the XSLT/XPath quadratic fixes as 0.4.3: single-node string extraction (string(@x), value-of) and the key(), id(), and EXSLT set:leading/set:trailing functions no longer rescan a wide parent's children per node, so they are linear rather than quadratic over a flat fan-out. A representative transform over a 20k-element document drops ~2.3s to ~0.65s (~3.5x); key()-driven ~1.15s to ~0.43s. Output identical (Xalan gold-output byte-for-byte). --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 358b1d3..7ef3c76 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.3] - 2026-06-25 + ### Fixed - `key()`, `id()`, and the EXSLT `set:leading`/`set:trailing` functions no longer rescan a node's siblings per comparison, which made them quadratic over a wide flat fan-out. They sorted their result with `sorted(by: Node.precedes)`, which recomputes both nodes' document-order keys on every comparison (each key a linear scan of a wide parent), and `key()` additionally deduplicated its matches with a linear membership scan. They now sort through `sortedByDocumentOrder()` (each key computed once, behind a shared sibling-index cache) and `key()` deduplicates through a set. The selected nodes, their document order, and the deduplication are unchanged. A `key()`-driven transform over a 20k-element document drops from about 1.15 s to about 0.43 s (~2.7x); the Apache Xalan gold-output corpus stays byte-identical. Guarded by `XSLTKeyIdOrderTests`.