Carey 🇳🇿 is a user on mastodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

I wrote a #Rust script that is, as expected, taking some time and CPU resources. However I see that it's only using one of my 8 cores(?) (see screenshot).

If I were to use threads in Rust could I use more than one CPU? octodon.social/media/YxBLdEj5e

Carey 🇳🇿 @carey

@schlink if the script’s work can be split across threads then yes, that should be the case, and it should run several times faster.

from what I’ve seen, the easiest way to do this is to use , github.com/rayon-rs/rayon

· Web · 0 · 1