Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

gadomski/json-hydrate-benchmark

Repository files navigation

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

Resources

License

Code of conduct

Stars

Watchers

Forks