Skip Navigation

Go 1.23 iter.Pull powered by coroutines

github.com go/src/runtime/coro.go at master · golang/go

The Go programming language. Contribute to golang/go development by creating an account on GitHub.

go/src/runtime/coro.go at master · golang/go

In the original proof of concept for ranging over functions, iter.Pull was implemented via goroutines and channels, which has a massive overhead.

When I dug in to see what the released code did I was delighted to see that the go devs implemented actual coroutines to power it. Which is one of the only ways to get sensible performance from this.

Will the coro package be exposed as public API in the future? Here's to hoping ♥️

0
0 comments