3 ms·
> I thought Single threaded execution without overhead for concurrency primitives is the best way to high performance computing You can have shared-memory para
by the8472 3y ago
> I thought Single threaded execution without overhead for concurrency primitives is the best way to high performance computing
You can have shared-memory parallelism with near-zero synchronization overhead. Rust's rayon is an example. Take a big vector, chunk it into a few blocks, distribute the blocks across threads, let them work on it and then merge the results. Since the chunks are independent you don't need to lock accesses. The only cost you're paying is sending tasks across work queues. But that's still much cheaper than spawning a new process.