当前位置:网站首页>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
边栏推荐
猜你喜欢
Pass parent component to child component: props
Fast quantitative, abbkine protein quantitative kit BCA method is coming!
SQLMAP使用教程(四)实战技巧三之绕过防火墙
Role of virtual machine
Apache AB stress test
Sword finger offer high quality code
计算机服务中缺失MySQL服务
Flexible layout (I)
Jesd204b clock network
Model application of time series analysis - stock price prediction
随机推荐
Non empty verification of collection in SQL
JS small exercise
Stockage et pratique des données en langage C (haut niveau)
Select the product attribute pop-up box to pop up the animation effect from the bottom
机器人技术创新与实践旧版本大纲
Hidden Markov model (HMM) learning notes
Readonly read only
Software acceptance test
MIPS uclibc cross compile ffmpeg, support g711a encoding and decoding
Mobx knowledge point collection case (quick start)
js小练习----分时提醒问候、表单密码显示隐藏效果、文本框焦点事件、关闭广告
子组件传递给父组件
Example of Pushlet using handle of Pushlet
Answer to the second stage of the assignment of "information security management and evaluation" of the higher vocational group of the 2018 Jiangsu Vocational College skills competition
Chinese and English instructions prosci LAG-3 recombinant protein
考研失败,卷不进大厂,感觉没戏了
Docker compose start redis cluster
$parent(获取父组件) 和 $root(获取根组件)
弹性布局(一)
leetcode 509. Fibonacci number