rayon
maturin
Our great sponsors
rayon | maturin | |
---|---|---|
66 | 37 | |
10,082 | 3,156 | |
2.9% | 6.5% | |
9.0 | 9.4 | |
3 days ago | 5 days ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rayon
- Too Dangerous for C++
-
What Are The Rust Crates You Use In Almost Every Project That They Are Practically An Extension of The Standard Library?
rayon: Async CPU runtime for parallelism.
-
Moving from Typescript and Langchain to Rust and Loops
In the quest for more efficient solutions, the ONNX runtime emerged as a beacon of performance. The decision to transition from Typescript to Rust was an unconventional yet pivotal one. Driven by Rust's robust parallel processing capabilities using Rayon and seamless integration with ONNX through the ort crate, Repo-Query unlocked a realm of unparalleled efficiency. The result? A transformation from sluggish processing to, I have to say it, blazing-fast performance.
-
The Rust I Wanted Had No Future
(see https://github.com/rayon-rs/rayon/tree/master/src/iter/plumbing)
-
General Recommendations: Should I Use Tree-sitter as the AST for the LSP I am developing?
Sequentially, generating tree-sitter AST for each file and querying for the links of each file takes around 2.3 seconds. However, I randomly remembered this crate rayon, and I decided to test it. It ended up improving the performance (just by changing 2 lines of code) to 200-300ms by parallelizing the iterators and tree-sitter queries. MAJOR.
-
python to rust migration
Now if you really want to use Rust, you can rewrite only the part that are slowing down your consumer. It's easy by using Py03 and maturin. Maybe also rayon to parallelize.
-
AI learns to play flappy bird (code in comments)
Maybe rayon could make some loops there and there faster if needed.
-
Making Python 100x faster with less than 100 lines of Rust
One of the others understated pros of rewriting some parts in Rust, it's that you can parallelize easily with Rayon[0]
-
Trying to learn by tutorials, for cannot find a single Actix/Diesel tutorial that actually compiles
On that topic, have you heard about our lord and savior rayon? 😊
-
Brett Slatkin: Why am I building a new functional programming language?
> He spoke of the potential for functional languages to provide a significant, intrinsic advantage when it comes to parallel computing.
> (...)
> If that were true, you'd expect that the many existing functional programming languages would have already satisfied this need. But in my opinion, they haven't
Well there is https://futhark-lang.org/ - it runs on the GPU, and is awesome.
On the CPU side, I think that Rust plus https://github.com/rayon-rs/rayon was a huge breakthrough on writing parallel programs using both functional and imperative programming, and future languages should learn from its successes. The ownership system & the borrow checker, plus other type-level features like the Send and Sync traits, were essential to enable sharing read-only data between threads without synchronization, or sharing read-write data with synchronization, all checked at compile time for data races (which is a huge problem to solve, and is something that neither Go nor Java protects against at compile time)
Indeed Futhark shares a key feature with Rust: it uses uniqueness types to enable in-place updates, which is kind like a limited form of Rust ownership: if you are the sole user of some memory, you can update it and other code will be none the wiser. This kind of thing is very important to build functional programs that are performant in practice.
maturin
-
In Rust for Python: A Match from Heaven
This story unfolds as a captivating journey where the agile Flounder, representing the Python programming language, navigates the vast seas of coding under the wise guidance of Sebastian, symbolizing Rust. Central to their adventure are three powerful tridents: cargo, PyO3, and maturin.
-
Feedback from calling Rust from Python
-- Maturin on GitHub
-
Some Reasons to Avoid Cython
My new favorite way to write very fast libraries for Python is to just use Rust and Maturin:
https://github.com/PyO3/maturin
It basically automates everything for you. If you use it with Github actions, it will compile wheels for you on each release for every platform and python version you want, and even upload them to PyPi (pip) for you. Everything feels very modern and well thought out. People really care about good tooling in the Rust world.
-
Which programming language to focus on for my PhD journey in bioinformatics?
Python first, you will be able to experiment quickly with the notebooks. Then maybe write (or rewrite) some modules in Rust that you can expose as python modules, with py03 and maturin. Feel free to publish useful packages on both crates.io and pypi.org, so you can contribute to Python and Rust ecosystems.
-
python to rust migration
Now if you really want to use Rust, you can rewrite only the part that are slowing down your consumer. It's easy by using Py03 and maturin. Maybe also rayon to parallelize.
-
Blog Post: Making Python 100x faster with less than 100 lines of Rust
In this case, PyO3/maturin does all the setup and getting the module into Python. They also have docs going into a lot more depth on this.
-
Is Rust faster than Python out of the box
Lastly if you're willing to introduce Rust, I'd consider a gradual approach using native libraries built in rust with PYO3. Check the maturin guide that helps you to streamline the build process of native libraries : https://github.com/PyO3/maturin . From there you could try to find hotspots in your python app and replace those with a native implementation.
- sccache now supports GHA as backend
-
Show HN: Python library for embedding large graphs (Written in Rust)
I like how this is a Rust project without any Python, that publishes a package to PyPI.
It uses Maturin (https://github.com/PyO3/maturin) for this, which I've never heard of but sounds really useful.
- Carefully exploring Rust as a Python developer
What are some alternatives?
crossbeam - Tools for concurrent programming in Rust
tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
RxRust - The Reactive Extensions for the Rust Programming Language
Poetry - Python packaging and dependency management made easy
setuptools-rust - Setuptools plugin for Rust support
rust-numpy - PyO3-based Rust bindings of the NumPy C-API
termux-packaging - Termux packaging tools.
tokio-rayon - Mix async code with CPU-heavy thread pools using Tokio + Rayon
sqlx - 🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite.
coroutine-rs - Coroutine Library in Rust
libfringe - a Rust library implementing safe, lightweight context switches, without relying on kernel services
PyOxidizer - A modern Python application packaging and distribution tool