News for hackers. Stuff that matters.
Re:Performance of green threads and why it matters by halayli on Sunday May 08, 2016 @01:41PM (#11654874)
Goroutines use segmented stacks that allows them to grow dynamically as needed. so 4k goroutines != 4gb of ram. They currently start at 8k and grow as needed but copies are incurred to keep it contiguous.

In lthread I preallocate fixed size 1mb stack but madvise after a coroutine yields if the stack shrunk. No copies are needed but it does consume the vm address space.

Re:Performance of green threads and why it matters by ominous_prime on Sunday May 08, 2016 @04:18PM (#11655565)
Go hasn't used segmented stacks in quite a while. Go now has 2k stacks and uses stack copying to grow.