The following code is taken from https://blog.golang.org/go-maps-in-action.
type Person struct { Name string Likes []string } var people []*Person *likes := make(map[string][]*Person)* for _, p := range people { for _, l := range p.Likes { *likes[l] = append(likes[l], p) //This line* } } Am I being paranoid in thinking the line with two likes[l] is actually doing two lookups ( two hashes, two probes ) and should be eliminated somehow? Coming from a C++ background ( gophers have mercy :P ), things like this really bothers me. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.