Go 1.23 iter.Pull powered by coroutines (github.com)
from kamstrup@programming.dev to golang@programming.dev on 15 Aug 2024 05:40
https://programming.dev/post/18148347

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 ♥️

#golang

threaded - newest