Small hobby project to test the performance of Rust<->Python bindings for "hydration" in pgstac.
The "do it in Rust but operate on the Python object directly" approach is the fastest:
method | time |
---|---|
python | 43.2±2μs |
serde_json | 193±10μs |
pyo3 | 7.89±0.2μs |
You'll need Rust and Python 3.11. Then:
scripts/bench
pip install -e '.[dev]'
We've got some tests:
pytest