gadomski / json-hydrate-benchmark

Small hobby project to test the performance of Rust<->Python bindings for hydration in pgstac

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

json-hydrate-benchmark

Small hobby project to test the performance of Rust<->Python bindings for "hydration" in pgstac.

Results

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

Running benchmarks

You'll need Rust and Python 3.11. Then:

scripts/bench

Developing

pip install -e '.[dev]'

We've got some tests:

pytest

About

Small hobby project to test the performance of Rust<->Python bindings for hydration in pgstac

License:Apache License 2.0


Languages

Language:Python 53.8%Language:Rust 43.1%Language:Shell 3.1%