[Stackless] Google's new Go programming language

Andrew Dalke dalke at dalkescientific.com
Wed Nov 18 00:05:20 CET 2009


On Nov 17, 2009, at 10:59 PM, Kristján Valur Jónsson wrote:
> Only if you can set up that machinery once, you can have O(1)

Ahh, indeed. I was thinking of amortized cost assuming it was being  
used >>N times.

Then again, in the Go context,

http://golang.org/doc/go_spec.html#Select_statements
> For all the send and receive expressions in the "select" statement,  
> the channel expressions are evaluated, along with any expressions  
> that appear on the right hand side of send expressions, in top-to- 
> bottom order. If any of the resulting operations can proceed, one  
> is chosen and the corresponding communication and statements are  
> evaluated. Otherwise, if there is a default case, that executes; if  
> not, the statement blocks until one of the communications can  
> complete.
>


That means there's an O(n) cost there as well for doing setup.

				Andrew
				dalke at dalkescientific.com






More information about the Stackless mailing list