Hi, all!

Is *for.*..*range* over an address/reference of  an array faster than 
regular *for...range*? For instance:

arr :=[...]int{1,2,3}
for _,v := range &arr{
   fmt.Println(v)
}

I heard that it  is slightly faster for huge arrays, but why is it so? And 
is it actually true (or makes sense)?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/33c85347-6b48-4e74-9718-15d5b7317f93%40googlegroups.com.

Reply via email to