Our great sponsors
-
parallel_primes_rs
A very naïve implementation of rust algorithm that finds all primes between two numbers
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
This article uses very inefficient mathematical computations to illustrate concurrency. That’s fine, they are just examples. But you might also be interested in learning how it’s really done, for example by reading the Primes package. [1]
[1] https://github.com/JuliaMath/Primes.jl/blob/master/src/Prime...
For a job interview I did the same parallelization of a`isPrime` in Rust, and it the basically as simple as the one for Julia, replacing a call of `into_iter()` with `into_par_iter()`. I also show the strong scaling relationship, which i wish all things talking about concurrency did. Link for the curious: https://github.com/pcrumley/parallel_primes_rs
The Folds.jl [1] package mentioned in the article is very nicely written.
For another alternative to Julia's built-in `Threads.@threads` macro, folks may also be interested in checking out `@batch` from Polyester.jl [2] (formerly CheapThreads.jl), which features particularly low-overhead threading.
[1] https://github.com/JuliaFolds/Folds.jl
[2] https://github.com/JuliaSIMD/Polyester.jl
The Folds.jl [1] package mentioned in the article is very nicely written.
For another alternative to Julia's built-in `Threads.@threads` macro, folks may also be interested in checking out `@batch` from Polyester.jl [2] (formerly CheapThreads.jl), which features particularly low-overhead threading.
[1] https://github.com/JuliaFolds/Folds.jl
[2] https://github.com/JuliaSIMD/Polyester.jl
Maybe you will find this helpful: https://github.com/gcalderone/ReusePatterns.jl
It includes an implementation of concrete subtyping.