Skip to content

json2xml-rs 0.4.2

Choose a tag to compare

@vinitkumar vinitkumar released this 15 Jul 19:31
Immutable release. Only release title and notes can be modified.
d6f1100

Performance

Flamegraph-guided XML escaping now uses a bounded sparse memchr fast path and switches to monotonic SIMD/word scanners after four matches. This keeps dense escape input linear while accelerating normal serializer payloads.

On the deterministic 5,000-record CPython 3.15.0b3 workload:

Metric 0.4.1 0.4.2 Change
Median conversion 6.007 ms 5.632 ms 6.23% lower
Mean conversion 6.013 ms 5.643 ms 6.14% lower
Escape writer exclusive samples 14.31% 7.97% 44.3% lower share
Output size 4,093,244 bytes 4,093,244 bytes identical

The 16 KiB streaming output buffer remains unchanged: a 4–128 KiB sweep plateaued across 16–64 KiB, and an ABBA confirmation measured 16 KiB about 0.8% faster than 32 KiB without extra per-call memory.

Compatibility and validation

  • preserved all five XML substitutions and UTF-8 boundaries
  • added a dense-input regression test for linear scanning
  • 48 Rust unit tests passed
  • 421 Python tests passed with exactly 100% statement coverage
  • release wheels were installed and tested across Linux, macOS, and Windows before publication
  • PyPI contains 34 non-yanked files, including CPython 3.10–3.14 wheels for both macOS architectures and a CPython 3.15 beta Linux wheel

Profiling evidence