News for hackers. Stuff that matters.
Re:Asynchronous IO in Rust by viraptor on Wednesday September 16, 2015 @05:18PM (#10229958)
There are some examples of speed difference at https://en.m.wikipedia.org/wiki/Green_threads

Basically if you have green threads with only one core, you don't need to do as much work with locking.

Re:Asynchronous IO in Rust by derefr on Wednesday September 16, 2015 @08:54PM (#10230952)
> Basically if you have green threads with only one core, you don't need to do as much work with locking.

This is half the basis for the original design of the Erlang BEAM VM. SMP was a grudging afterthought; the original concept was that each VM "node" was a single scheduler process bound to a single core, and then you tied those nodes together into a (machine-internal) multi-core distributed system, effectively creating a set of "threads" communicating over socket-based message-passing IPC, rather than shared memory.

M:N scheduling—where, critically, a task can be re-scheduled from one core to another—is a much more complex and less-predictable design, that's not always worth the trouble. For Erlang's particular use-cases, it turned out to be worth the trouble enough to justify programming it, eventually. But the SMP VM is still only built via a configure flag, rather than displacing the M:1 VM as "the" VM.

Re:Asynchronous IO in Rust by saurik on Wednesday September 16, 2015 @05:25PM (#10230015)
The argument here is less about the performance difference existing or not, and that the decision in question sounds to have been made due to the lack of something we care less about.
Re:Asynchronous IO in Rust by viraptor on Wednesday September 16, 2015 @07:30PM (#10230690)
I was responding to the first paragraph, which is technically all about the performance differences. (it does say "How could it be the case that virtual threads implemented in user space are faster than native threads provided by the OS?") Whether that matters and is a valid decision point is a completely different question as you say.