Donald E.Knuth说过一句非常著名的话,过早的优化是万恶之源。原文如下:
We should forget about small efficiencies, say about 97% of the time; premature optimization is the root of all evil.
我是...
疑问
请问main调用GetUserInfo后返回的&User{...}。这个变量是分配到栈上了呢,还是分配到堆上了?
package main
type User struct {
ID int64
Name string
}
func GetUserInfo() *User {
return &U...