PureXML/docs
Mihaela Mihaljevic 7ffd1dd545 perf(parsing): remove redundant work in attribute-value and namespace scanning
Two profile-guided passes (#139), found by sample-profiling a 42MB generated
corpus after re-measuring the parse/libxml2 ratio fresh:

scanAttributeValue's closing-quote check re-derived an already-known answer
through Reader.consume's general String-iteration path, which allocates a
fresh String(quote) and iterates it via Character machinery twice, on every
single attribute value in the document. The content loop's own break
condition already guarantees the buffered peek is either the quote or end of
input, so checking it directly and advancing once is the same behavior for
less work.

NamespaceContext.enterElement, called once per element: checkNameShape's
name.localName.contains(":") resolved to Sequence.contains(_:), walking
extended grapheme clusters to find one ASCII byte; utf8.contains(0x3A) finds
the same colon via the UTF-8 byte view. Separately, attributes.map{
resolveAttribute } allocated a fresh backing array on every element even
though resolveAttribute returns its argument unchanged whenever the attribute
has no prefix or the xmlns prefix (the common case); checking first with no
allocation and reusing the input array when nothing would change gives the
identical result without it.

Both are same-observable-behavior changes, verified against the full local
suite (1852 tests) and the full W3C XSTS conformance suite (14383 groups),
both unchanged. Measured parse ~6.59x -> ~6.00x versus libxml2 at the
20000-item/4.2MB corpus, best of 5; see docs/benchmarks.md passes 25-26.
2026-07-12 11:40:33 +02:00
..
design perf(schema): graph-structured-stack content matcher, killing the last 2^K content-model hang (#364) 2026-06-28 05:07:37 +02:00
plans fix(schema): a non-nillable element must carry no xsi:nil at all (cvc-elt.3.1) 2026-06-20 03:22:05 +02:00
benchmarks.md perf(parsing): remove redundant work in attribute-value and namespace scanning 2026-07-12 11:40:33 +02:00
engineering.md chore(rules): pin rules-swift corpus, add gates and CI; drop redundant docs/rules mirror 2026-06-30 14:02:40 +02:00
mermaid.md chore(rules): pin rules-swift corpus, add gates and CI; drop redundant docs/rules mirror 2026-06-30 14:02:40 +02:00
onboarding-antigravity.md chore(test): add scripts/fetch-xsts.sh to obtain the XSTS corpus (#321) 2026-06-26 08:59:07 +02:00
production-readiness.md docs: production-readiness standard, read every conformance iteration 2026-06-14 16:28:03 +02:00
release-hurdles.md fix(schema): attribute-wildcard union/intersection per Errata E1-10 (#251) 2026-06-23 04:56:17 +02:00
research-first.md chore(rules): pin rules-swift corpus, add gates and CI; drop redundant docs/rules mirror 2026-06-30 14:02:40 +02:00
roadmap.md chore(codeberg): update links for NodetteHQ 2026-07-05 12:59:57 +02:00
rules-swift-audit.md chore(release): stamp 0.4.8 from main and repoint to codeberg.org/Mihaela 2026-07-05 05:31:16 +02:00
rules-swift-corpus.sha256 chore(rules): pin rules-swift corpus, add gates and CI; drop redundant docs/rules mirror 2026-06-30 14:02:40 +02:00
schema-validity-burndown.md fix(schema): carry global ref metadata into restrictions 2026-06-19 09:03:49 +02:00
validation-coverage-registry.txt perf(model): make the value Node tree type depth-safe (#344) 2026-06-26 17:05:42 +02:00
validation-field-registry.txt feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
xsts-deviations.md fix(schema): literal RecurseAsIfGroup for a non-repeating base choice 2026-07-05 08:58:35 +02:00