Hacker News new | ask | show | jobs
Show HN: Arrayops – 100x faster Python array operations with Rust (github.com)
3 points by EddieDean 175 days ago
2 comments

Author here. I've been working on optimizing Python data processing and created arrayops, a library that accelerates Python's built-in array.array type using Rust.

The Problem: Python's array.array is memory-efficient but slow. NumPy solves this but is heavyweight and often overkill for 1D data.

The Solution: arrayops provides fast operations directly on array.array: - 10-100x faster than pure Python - Zero dependencies - Works with array.array, numpy (1D), memoryview, Arrow

Performance (1M int32 array): - sum(): 50ms → 0.5ms (100x faster) - scale(): 80ms → 1.5ms (50x faster) - All operations use zero-copy buffer access

Key Features: - Production ready (1.0.0, 100% test coverage) - MIT licensed - Full type hints and documentation

GitHub: https://github.com/eddiethedean/arrayops Docs: https://arrayops.readthedocs.io PyPI: https://pypi.org/project/arrayops/

I'd love feedback, especially on: - Performance optimization approaches - API design decisions - Use cases I might have missed

Built with PyO3 (Rust-Python interop) and maturin (packaging).

does this work with multidimensional or just 1D? polars had the same limitation, ended up just sticking with numpy
Just 1D. Stick with numpy.