Time series downsampling in rust
Maintained. Last release 6 months ago, commits in 1 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install tsdownsampletsdownsample
Extremely fast time series downsampling 📈 for visualization, written in Rust.
Features ✨
- Fast: written in rust with PyO3 bindings
- leverages optimized argminmax - which is SIMD accelerated with runtime feature detection
- scales linearly with the number of data points
- multithreaded with Rayon (in Rust)
Why we do not use Python multiprocessing
Citing the PyO3 docs on parallelism:
CPython has the infamous Global Interpreter Lock, which prevents several threads from executing Python bytecode in parallel. This makes threading in Python a bad fit for CPU-bound tasks and often forces developers to accept the overhead of multiprocessing.
In Rust - which is a compiled language - there is no GIL, so CPU-bound tasks can be parallelized (with Rayon) with little to no overhead.