Skip to content

v6.0.1 - Easy Rust Installation & Updated Benchmarks

Choose a tag to compare

@vinitkumar vinitkumar released this 16 Jan 07:14
· 8 commits to master since this release
be3c7ef

json2xml v6.0.1

This release enables the [fast] optional dependency and includes comprehensive benchmark comparisons.

🚀 Easy Rust Acceleration

You can now install json2xml with Rust acceleration in a single command:

pip install json2xml[fast]

This automatically installs both json2xml and json2xml-rs.

📊 Comprehensive Benchmark Results

Tested on Apple Silicon, comparing all implementations:

Performance Summary

Test Case Python Rust Go Zig
Small (47B) 40.12µs 1.45µs 4.65ms 3.74ms
Medium (3.2KB) 2.14ms 71.28µs 4.07ms 3.28ms
Large (32KB) 21.08ms 739.89µs 4.05ms 6.11ms
Very Large (323KB) 212.61ms 7.55ms 4.38ms 33.24ms

Speedup vs Pure Python

Test Case Rust Go Zig
Small (47B) 27.6x 0.0x* 0.0x*
Medium (3.2KB) 30.0x 0.5x* 0.7x*
Large (32KB) 28.5x 5.2x 3.5x
Very Large (323KB) 28.2x 48.5x 6.4x

*CLI tools have ~3-4ms process spawn overhead

Key Findings

  1. Rust is best for Python users - ~28x faster with zero overhead
  2. Go excels for large CLI workloads - 48x faster for 300KB+ files
  3. CLI startup overhead matters - Go/Zig slower for small files due to process spawn

📦 Installation Options

# Pure Python (always works)
pip install json2xml

# With Rust acceleration (recommended)
pip install json2xml[fast]

🔗 Related Projects

What's Changed

  • Enable [fast] optional dependency for easy Rust installation
  • Add comprehensive benchmark_all.py script
  • Update BENCHMARKS.md with Python/Rust/Go/Zig comparison

Full Changelog: v6.0.0...v6.0.1