æ¬è¨äºã¯ Go 2 Advent Calendar 2020 ã®22æ¥ç®ã®è¨äºã§ã Goã«ã¯ãã¤ã³ã¿ã®æ¦å¿µãåå¨ãã¾ã ãã¤ã³ã¿ã«ããå¤æ°ã®åã渡ãã¯ãå¤ãã³ãã¼ããå¿
è¦ããªãã¢ãã¬ã¹ã渡ãã ãã§å®äºããã®ã§å¹ççã§ãããGoã®å ´åãã¤ã³ã¿ã使ããããã¨ã¬ãã¼ã¸ã³ã¬ã¯ã·ã§ã³ã«è² è·ãããã£ã¦ãã¾ããå¤ãã®CPUæéãæ¶è²»ããããã«ãªãå¯è½æ§ãããã¾ã ä¾ãã°ã以ä¸ã®ããã«Sã¨ããæ§é ä½ããã³ãã¼ãã¦è¿ãé¢æ°ããã¤ã³ã¿ã§è¿ãé¢æ°ãããããç¨æãã¾ã type S struct { a, b, c int64 d, e, f string g, h, i float64 } func byCopy() S { return S{ a: 1, b: 1, c: 1, e: "foo", f: "foo", g: 1.0, h: 1.0, i: 1.0, } } func byPointer() *