Skip to content

Comment on Ask HN: Do we have evidence that green threading is faster than OS threads?

Comments

The performance of green threads depends on its implementation within the VM or runtime. Some VMs implement a form of cooperative multiprocessing which avoids needing to invoke OS level syscalls and context switches. That is why you get apparently better performance for some benchmarks.

On physical hardware, OS threading performance is influenced by the architecture, cache(s) size, coherence, inter-processor locks, out of order execution, hyper-threading (implemented in silicon), memory size, OS version and of course applications mix.

The reason you can't find any benchmarks or performance data is due to the fact that there are just too many permutations to consider. For example, a comparison between the .Net test you mentioned with Java green-threads running on Linux would be totally meaningless.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.