News for hackers. Stuff that matters.
Re:Composable multi-threaded parallelism in Julia by thekhatribharat on Tuesday July 23, 2019 @05:56PM (#20510586)
> this kind of composable parallelism are Go and Erlang, ... which therefore optimize for I/O throughput rather than CPU throughput

Parallelism is always for CPU throughput, precisely why you don't run any more OS threads than the number of cores.

Concurrency primitives (whether in Go, Erlang or any other programming language) are meant for I/O-bound tasks. Let's not conflate concurrency primitives enabling I/O-bound tasks and parallelism primitives enabling CPU-bound tasks.

Re:Composable multi-threaded parallelism in Julia by chrisseaton on Tuesday July 23, 2019 @07:52PM (#20511229)
> precisely why you don't run any more OS threads than the number of cores

It’s often worth running more than your number of cores, in order to keep execution units busy during memory fetches for example, or integer units busy while float units are a bottleneck otherwise. (Did a PhD partially on this kind of thing.)

Re:Composable multi-threaded parallelism in Julia by BubRoss on Tuesday July 23, 2019 @08:18PM (#20511342)
That's what hyperthreading is for, which implies having the same number of threads as logical cores.

Hyperthreading and out of order execution are meant to accomplish keeping the execution units busy.

Re:Composable multi-threaded parallelism in Julia by chrisseaton on Tuesday July 23, 2019 @08:39PM (#20511430)
No it implies having the same number of OS threads as hardware threads, which is more than the number of hardware cores.
Re:Composable multi-threaded parallelism in Julia by BubRoss on Wednesday July 24, 2019 @12:14AM (#20512320)
That's what logical cores means. Hardware threads / hyper threads are also called logical cores by the bios and OS.
Re:Composable multi-threaded parallelism in Julia by gpderetta on Wednesday July 24, 2019 @09:13AM (#20514880)
You are obviously correct and I'm not sure why you are being downvoted.
Re:Composable multi-threaded parallelism in Julia by elcritch on Tuesday July 23, 2019 @07:16PM (#20511067)
You can still use Erlang style concurrency (or Go style as well) to truly parallelize CPU bound tasks. It’s a bit less efficient due to Erlangs design where you can’t readily share mutable data between processes but will still enable true parallel calculations on all cores. By default BEAM runs one execution thread per core. For example, it’d be trivial to write a true parallel merge sort in Erlang/Elixir.

Now NodeJS or Python Asio style concurrency _are_ truly limited by their VMs and can’t do native parallel computations in a single process.