Skip to content

json2xml 6.5.0

Latest

Choose a tag to compare

@vinitkumar vinitkumar released this 15 Jul 19:49
Immutable release. Only release title and notes can be modified.
32038e6

Highlights

  • Reduced pure Python serializer time from 83.0 ms to 57.2 ms on the deterministic 5,000-record workload: 31.1% lower.
  • Reduced traced function calls by 37.4% and isinstance calls by 76.1% through exact native-type hot-path dispatch while preserving subclass behavior.
  • Made the full Python suite an exact 100% statement-coverage gate: 421 tests cover all 762 statements.
  • Requires the already-published json2xml-rs>=0.4.2 accelerator for json2xml[fast].

Performance

All Python profiles used uv-managed CPython 3.15.0b3 and the same deterministic 5,000-record nested payload.

Pure Python metric Before After Change
Conversion time 83.0 ms 57.2 ms 31.1% lower
20-loop traced time 8.311 s 5.782 s 30.4% lower
Function calls 48.17 million 30.13 million 37.4% fewer
isinstance calls 11.70 million 2.80 million 76.1% fewer

Rust 0.4.2 was released first. Its paired release median improved from 6.007 ms to 5.632 ms (6.23% lower) with identical 4,093,244-byte output. The hybrid XML escape scanner keeps dense inputs linear while retaining the measured 16 KiB streaming buffer.

Profiling evidence

Install

pip install "json2xml[fast]==6.5.0"

Verification

The release passed all 48 PR checks: the full CPython 3.10–3.15 beta and PyPy matrix on Linux, macOS, Windows, and ARM; free-threaded Python; linters; CodeQL; dependency security checks; documentation; and wheel/sdist validation.

Related work: #340, #341, #342.