thanks for reply regards cheng
On Friday, July 23, 2021 at 12:44:21 PM UTC+8 Ian Lance Taylor wrote: > On Thu, Jul 22, 2021 at 6:58 PM cheng dong <qq451...@gmail.com> wrote: > > > > 1. if a function's signature is f `func([]byte)` and we have a string s, > then when we call `f([]byte(s))` golang wont create a []byte then copy, in > opposite, golang will use the internal byte slice in string. > > 2. if we use a for range to set every item in slice to a const value, > then the for range will be auto turn to memset. > > > > i want to know where i can find all these language optimize, so avoid to > do useless human opt again. > > As far as I know there is no general description of all compiler > optimizations in any useful form. Sorry. > > Ian > -- 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/83e87d2b-9d18-432b-bb3a-d435a6926f02n%40googlegroups.com.