Re:Why has CPU frequency ceased to grow? (2014)
by pjmlp on Wednesday February 21, 2018 @07:03AM
(#16428803)
> Parallelism hasn’t seen a great deal of use until it’s urgently needed
This is the main reason why, initially, Windows Store APIs were all async.
Microsoft learned that when developers can choose between both models, by default most chose synch models.
Re:Why has CPU frequency ceased to grow? (2014)
by romwell on Monday February 26, 2018 @10:47PM
(#16470938)
>Basically, Rayon makes data parallelism really easy in a way that few if any other languages do.
Syntax-wise, there's OpenMP which can turn a for-loop into a parallelized for-loop (independently scheduled iterations) with just some syntactic sugar on top of the loop.
OpenMP has support for at least C++ and Fortran, and is not hard to use.
I wonder how Rayon compares to OpenMP.
Re:Why has CPU frequency ceased to grow? (2014)
by ethagnawl on Wednesday February 21, 2018 @10:02AM
(#16429893)
FWIW, you can also achieve similar behavior in Clojure via pmap, Reducers, etc.
Re:Why has CPU frequency ceased to grow? (2014)
by floatboth on Wednesday February 21, 2018 @11:10AM
(#16430460)
And in Haskell https://www.stackage.org/haddock/lts-10.6/parallel-3.2.1.1/C...
And in .NET https://docs.microsoft.com/en-us/dotnet/api/system.threading...
And in Java https://blog.oio.de/2016/01/22/parallel-stream-processing-in...
Rayon is notable because Rust is a native-compiled, no-GC language.
Re:Why has CPU frequency ceased to grow? (2014)
by brazzy on Wednesday February 21, 2018 @11:57AM
(#16430855)
To me, the "If it’s not thread-safe to do, then it won’t compile" part sounds rather more notable.
Re:Why has CPU frequency ceased to grow? (2014)
by coolsunglasses on Wednesday February 21, 2018 @12:45PM
(#16431307)
That's true of Haskell for the parallelism faculties. It's also true for STM. You can still get stuck or have race conditions with the other concurrency abstractions but it's less common than I encountered elsewhere. I didn't have problems resulting from mutable shared state that was aliased across threads and wasn't supposed to be, it's always explicit.
Re:Why has CPU frequency ceased to grow? (2014)
by mitchtbaum on Wednesday February 21, 2018 @01:46PM
(#16431833)
Another good crate to look at for this is Actix, Rust actors framework:
Basically, Rayon makes data parallelism really easy in a way that few if any other languages do. I’d love to have an equivalent in Python or Node, but it’s just not possible to achieve such a thing in most languages—even if you ignore the thread safety aspect.
Parallelism hasn’t seen a great deal of use until it’s urgently needed, because it’s hard to get right in most environments, and you normally need to substantially refactor code to make it happen. My hope is that with the likes of Rayon, parallelism can be a much more natural thing that people that care even a little about performance will just do, because it’s so easy to do.
https://crates.io/crates/rayon