Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Performace



  How the Go language improves expressiveness without sacrificing runtime performance

This week there was a discussion on the golang-nuts mailing list about an idiomatic way to update a slice of structs. For example, consider this struct representing a set of counters. type E struct { A, B, C, D int } var e = make([]E, 1000) Updating these counters may take the form for i := range e { e[i].A += 1 e[i].B += 2 e[i].C += 3 e[i].D += 4 } Which is good idiomatic Go code. It's pretty fast too BenchmarkManual 500000 ...

   Go,Expressiveness,Performace,Sacrifice     2012-02-12 04:53:55