Skip to content

PureXML 0.4.2

Choose a tag to compare

@mihaelamj mihaelamj released this 25 Jun 14:15
· 62 commits to main since this release
1ae71c3

Post-0.4.1 parse and serialize performance. Backward compatible, identical results.

Performance (vs libxml2, 20k-item generated corpus)

  • parse ~9x -> ~5.8x slower than libxml2:
    • bulk-copy literal runs in the entity decoder (#291)
    • split the name prefix from a scanned colon offset, no second pass (#292)
    • adopt prepared children when materializing the tree (#293)
    • scan for entity-decoder markers at the byte level (#294)
    • build the TreeNode tree directly from the event stream, eliminating the value-tree intermediate (#295)
  • serialize ~3.0x -> ~2.3x slower than libxml2:
    • bulk-copy verbatim runs when escaping output (#296)
    • find the characters to escape by scanning bytes, not graphemes (#297)

Verification

Full local suite (1725 tests), the W3C XML conformance, RELAX NG, Apache Xalan XSLT gold-output, and C14N canonicalization corpora, and the WASM cross-platform build, all green across macOS, Linux, and Windows. Every change is covered by a dedicated differential test (decode, colon-placement, tree-structure, escaping, all with multibyte-boundary cases) and an adversarial equivalence review. swiftformat and swiftlint --strict clean.

Full changelog: https://github.com/mihaelamj/PureXML/blob/main/CHANGELOG.md