HackerTrans
トップ新着トレンドコメント過去質問紹介求人

EddieDean

no profile record

投稿

Show HN: Arrayops – 100x faster Python array operations with Rust

github.com
3 ポイント·投稿者 EddieDean·6 か月前·3 コメント

コメント

EddieDean
·6 か月前·議論
Just 1D. Stick with numpy.
EddieDean
·6 か月前·議論
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).