"To make the stacks small, Go's run-time uses segmented stacks. A
newly minted goroutine is given a few kilobytes, which is almost
always enough. When it isn't, the run-time allocates (and frees)
extension segments automatically "
http://golang.org/doc/go_lang_faq.html#goroutines
also, http://research.swtch.com/2010/03/broken-abstractions-in-go.html
has some information about how the 'go' keyword works and the overhead
of spawning a goroutine compared to making a regular function call.
- jessta
--
=====================
http://jessta.id.au
I don't know if it can considered a good benchmark btw I got these results
when I compared Go goroutines spawning times against Erlang processes ones:
http://remogatto.github.com/go-benchmarks/
The time to spawn a goroutine seems an order of magnitude lower than the
time to spawn an Erlang process. Above all, the time to create an Erlang
process seems to increase when the number of spawned processes increases.
Cheers,
Andrea
--
Andrea Fazzi @ alcacoop.it
Read my blog at http://freecella.blogspot.com
Follow me on http://twitter.com/remogatto