Home > Backend Development > Golang > How Has Go's Garbage Collection Evolved from Go 1.1 to Go 1.4 ?

How Has Go's Garbage Collection Evolved from Go 1.1 to Go 1.4 ?

Susan Sarandon
Release: 2025-01-02 14:21:38
Original
919 people have browsed it

How Has Go's Garbage Collection Evolved from Go 1.1 to Go 1.4 ?

Garbage Collection in Go

Go is a garbage-collected language, with the Go documentation stating that it employs a mark-and-sweep GC.

Go 1.1 Garbage Collector

Go 1.1 debuted a parallel mark-and-sweep garbage collector. This non-generational and non-compacting GC offered mostly precise memory management, excluding stack frames. It supported finalizers but lacked weak references.

Go 1.3 Garbage Collector Updates

Go 1.3 enhancements included concurrent sweep for reduced pause times and precision improvements, making it fully precise.

Go 1.4 Garbage Collector Plans

The upcoming Go 1.4 garbage collector will introduce a hybrid approach. It will comprise:

  • Hybrid stop-the-world/concurrent collection
  • Stop-the-world portion with a 10ms deadline
  • Dedicated CPU cores for concurrent collection
  • Tri-color mark-and-sweep algorithm
  • Non-generational and non-compacting design
  • Precise detection
  • Potential latency trade-off for throughput compared to Go 1.3 GC

The above is the detailed content of How Has Go's Garbage Collection Evolved from Go 1.1 to Go 1.4 ?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template