3 ms·
The benchmark does not fit the title. In the benchmark as originally done, threads took 3x the memory of goroutines. And that benchmark missed the 40 MB of da
by btilly 6y ago
The benchmark does not fit the title.
In the benchmark as originally done, threads took 3x the memory of goroutines. And that benchmark missed the 40 MB of data hidden in the kernel. Which makes a thread take over 4x the memory of a goroutine. And threads were 50% slower.
The memory and performance overhead of threads may not be an issue in specific use cases when you're doing real work. But a factor of 4+ memory overhead does make threads significantly larger than goroutines.