golang学习笔记之并发优化(二)
打包发送通往管道的数据如果一次打包发送的性能要高于多次发送。请看下面里面,这个里面我往管道里面发送50000000次func main() { done ,c :=make(chan int),make(chan int ,500) go func() { count :=0 for x := range c { count +