runtime: special case timer channels #8898
Comments
Comments about this bug are in https://go-review.googlesource.com/#/c/8356/ |
I intend to look into this for Go 1.7. I've started work on a CL. |
Note there is a caveat: if we have code like:
Currently we arm and install the timer once. If we special case timer channels, we will need to install and uninstall the timer for each select. |
@rsc is this going to make 1.8? |
Did not get to this. |
That seems like a disadvantage, not an advantage: it would encourage writing non-portable Go code (that is, programs which appear to work when using the Unless you're proposing to make a corresponding language change, in which case this seems like it needs to be a full-fledged proposal.
There is a more general version of this optimization which we might want to consider anyway. If we:
then we can (and arguably should) combine the struct and the referent into a single allocation. That optimization is more or less orthogonal to any special-casing for timer channels in |
The text was updated successfully, but these errors were encountered: