HackerTrans
TopNewTrendsCommentsPastAskShowJobs

EddieDean

no profile record

Submissions

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

github.com
3 points·by EddieDean·6 माह पहले·3 comments

comments

EddieDean
·6 माह पहले·discuss
Just 1D. Stick with numpy.
EddieDean
·6 माह पहले·discuss
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).