2 ms·
You are right, I misread it. I agree that there is no visible difference in the code, and that's exactly what I like. What's different, however, is how Go rout
by fooyc 10y ago
You are right, I misread it.
I agree that there is no visible difference in the code, and that's exactly what I like. What's different, however, is how Go routines have much less overhead than OS threads.
- pcwalton 10y agoIt's not as much as you think, and goroutines also have significant overheads that OS threads don't. Most of the time, when people talk about goroutine overhead, they're referring to the small stacks, which are actually a property of GC--there are language implementations that are 1:1 that also have small stacks, such as SML/NJ.