78

GO性能优化小结 – 碎言碎语

 6 years ago
source link: http://johng.cn/go-optimize-brief/?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
1 内存优化 1.1 小对象合并成结构体一次分配,减少内存分配次数 做过C/C++的同学可能知道,小对象在堆上频繁地申请释放,会造成内存碎片(有的叫空洞),导致分配大的对象时无法申请到连续的内存空间,一般建议是采用内存池。Go

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK