当前位置:网站首页>4、 High performance go language release optimization and landing practice youth training camp notes
4、 High performance go language release optimization and landing practice youth training camp notes
2022-07-07 07:24:00 【A low-key horse】
High performance Go Language distribution optimization and implementation practice | Youth Camp notes
This is my participation 「 The third youth training camp - Back end field 」 The third part of note creation activities 4 Notes
Memory aspect
One 、 Automatic memory management
Concept :
Mutator: Business thread , Assign new objects , Modify the object pointing relationship ( Created goroutine)
Collector:GC Threads , Find the living object , Reclaim memory space of dead objects
Serial GC: only one collector
Parallel GC: Support multiple collectors Recycled at the same time GC Algorithm
Concurrent GC:mutator(s) and collector(s) It can be executed at the same time
GC:
GC Algorithm : Security 、 Throughput rate 、 Pause time 、 Memory overhead
Track garbage collection :
- Tag root object
- Mark reachable objects
- Clean up unreachable objects
- Use different marking and cleaning strategies according to the life cycle of the object
generational GC:
Age : experienced GC The number of times
Purpose : For young or old people of different ages , Develop different strategies GC Strategy , Reduce overall memory management overhead
Reference count :
- Each object has the number of references associated with it , Greater than 0 It's survival
- The disadvantage is that ring data structures cannot be recycled 、 Maintaining reference counts is expensive
Two 、Go Memory management and optimization
Memory allocation :
Block
cache
Management optimization
go Memory allocation
- Actual optimization plan :Balanced GC
Compiler optimization
One 、 Compiler and static analysis
Compiler structure :
Static analysis :
In process analysis 、 Interprocess analysis :
Two 、Go Compiler optimization
Function inlining :
Escape analysis :
Static analysis :
In process analysis 、 Interprocess analysis :
Two 、Go Compiler optimization
Function inlining :
Escape analysis :
Beast mode
边栏推荐
- [explanation of JDBC and internal classes]
- How to * * labelimg
- js小练习----分时提醒问候、表单密码显示隐藏效果、文本框焦点事件、关闭广告
- At the age of 20, I got the ByteDance offer on four sides, and I still can't believe it
- Introduction to abnova's in vitro mRNA transcription workflow and capping method
- RuntimeError: CUDA error: CUBLAS_ STATUS_ ALLOC_ Failed when calling `cublascreate (handle) `problem solving
- Test of transform parameters of impdp
- Networkx drawing and common library function coordinate drawing
- Torefs API and toref API
- Explain Bleu in machine translation task in detail
猜你喜欢
随机推荐
Freeswitch dials extension number source code tracking
$parent(获取父组件) 和 $root(获取根组件)
Multidisciplinary integration
Explain Bleu in machine translation task in detail
Network foundation - header, encapsulation and unpacking
选择商品属性弹框从底部弹出动画效果
OOM(内存溢出)造成原因及解决方案
Academic report series (VI) - autonomous driving on the journey to full autonomy
Music | cat and mouse -- classic not only plot
Stockage et pratique des données en langage C (haut niveau)
Abnova membrane protein lipoprotein technology and category display
【Liunx】进程控制和父子进程
PostgreSQL source code (60) transaction system summary
Unity C function notes
Modify the jupyter notebook file path
URP - shaders and materials - light shader lit
Composition API premise
AVL树的实现
Mobx knowledge point collection case (quick start)
Implementation of AVL tree