Hasty Briefsbeta

Bilingual

Runtime: Green tea garbage collector (Go)

a year ago
  • #go
  • #garbage-collection
  • #performance
  • Green Tea is a new parallel marking algorithm designed to improve memory locality and reduce garbage collection CPU costs.
  • The algorithm processes memory in larger, contiguous blocks (spans) instead of individual objects to improve spatial and temporal locality.
  • Small object spans (up to 512 bytes) are the focus due to higher per-scan overhead benefits.
  • Work distribution is optimized using a distributed work-stealing queue, reducing contention on many-core systems.
  • A single-object scan optimization ensures performance parity with the current algorithm for sparse spans.
  • Benchmark results show significant reductions in GC CPU costs (10–50%) in GC-heavy workloads, with better scalability on high-core-count systems.
  • Future work includes SIMD-accelerated scanning kernels and exploring concentrator networks for higher pointer density.
  • The prototype is available for experimentation and planned as an opt-in feature in Go 1.25.