By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: Go’s New Green Tea Garbage Collector May Improve Performance up to 40%
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > News > Go’s New Green Tea Garbage Collector May Improve Performance up to 40%
News

Go’s New Green Tea Garbage Collector May Improve Performance up to 40%

News Room
Last updated: 2025/11/14 at 2:42 PM
News Room Published 14 November 2025
Share
Go’s New Green Tea Garbage Collector May Improve Performance up to 40%
SHARE

Go 1.25 introduces a new experimental garbage collector that delivers up to 40% faster than the current implementation, bringing a significant performance improvement for GC-heavy workloads.

The new garbage collector, called Green Tea, uses the same mark-sweep approach as the existing GC, but with a key difference: instead of operating on individual objects, it works at the memory page level. This means Green Tea scans and tracks entire pages globally, whilt tracking individual objects locally within each page rather than across the heap.

This all adds up to a better fit with the microarchitecture. We can now scan objects closer together with much higher probability, so there’s a better chance we can make use of our caches and avoid main memory. Likewise, per-page metadata is more likely to be in cache. Tracking pages instead of objects means work lists are smaller, and less pressure on work lists means less contention and fewer CPU stalls.

This approach greatly reduces the number of scans required to mark the whole heap, which is significant since “about 90% of the cost of the garbage collector is spent marking, and only about 10% is sweeping”, according to Go contributors Michael Knyszek and Austin Clements.

Knyszek and Clements also explain that Green Tea was developed in response to the challenges posed by modern CPU hardware, which risk to make code slower rather than faster as hardware evolves. In particular, newer CPUs introduce non-uniform memory access, where a subset of cores has privileged access to a subset of memory; reduced memory bandwidth per CPU, due to more cores competing for memory access; and an increasing core count, making it harder for the GC algorithm to work in parallel.

On the other hand, advanced CPU features such as vector instructions and wide registers offer opportunities for significant speedups, provided the GC algorithm can take advantage of them, say Knyszek and Clements.

Vector hardware has long supported basic bit-wise operations on whole vector registers, but starting with AMD Zen 4 and Intel Ice Lake, it also supports a new bit vector “Swiss army knife” instruction that enables a key step of the Green Tea scanning process to be done in just a few CPU cycles. Together, these allow us to turbo-charge the Green Tea scan loop.

As mentioned, Green Tea can reduce garbage collection overhead by 10-40%, depending on the memory workload. For an application that spends 10% of its time in the garbage collector, this translates to an overall CPU reduction of 1-4%.

However, not all workloads benefit from Green Tea:

Green Tea is based on the hypothesis that we can accumulate enough objects to scan on a single page in one pass to counteract the costs of the accumulation process. […] But there are some workloads that often require us to scan only a single object per page at a time. This is potentially worse than the graph flood.

As a point in case, dolthub, maker of version-controlled SQL database dolt, chose not to adopt Green Tea for production builds:

For Dolt, the Green Tea collector doesn’t make any difference in real-world performance numbers. Under the hood, it seems that there’s a small regression in mark time, but this isn’t measurable in our latency benchmarks.

Other early adopters reported that Tea Green runs GC less frequently in their memory-heavy app, but each cycle consumes more CPU. While this reduces the overall GC CPU consumption, it increases latency significantly. However, this behavior has already been fixed for the upcoming Go 1.26.

This variability in results is the main reason why the new garbage collector is not enabled by default, despite being production-ready according to the Go team. To test Green Tea with Go 1.25, you can enable it by setting GOEXPERIMENT=greenteagc at build time.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article Best Camera 2025: Take your photography to the next level Best Camera 2025: Take your photography to the next level
Next Article Content Moderation is a Must for Online Businesses | HackerNoon Content Moderation is a Must for Online Businesses | HackerNoon
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

Top Chinese smartphone brand suspends its foldable phone line: report · TechNode
Top Chinese smartphone brand suspends its foldable phone line: report · TechNode
Computing
The Government launches the Open Source AI Community in Spain
The Government launches the Open Source AI Community in Spain
Mobile
Reducing False Positives in Retrieval-Augmented Generation (RAG) Semantic Caching: A Banking Case Study
Reducing False Positives in Retrieval-Augmented Generation (RAG) Semantic Caching: A Banking Case Study
News
Trump is Coming for Public Housing – Knock LA
Trump is Coming for Public Housing – Knock LA
Computing

You Might also Like

Reducing False Positives in Retrieval-Augmented Generation (RAG) Semantic Caching: A Banking Case Study
News

Reducing False Positives in Retrieval-Augmented Generation (RAG) Semantic Caching: A Banking Case Study

24 Min Read
Older Pixel Phones Score a Handy New Feature: Call Recording
News

Older Pixel Phones Score a Handy New Feature: Call Recording

2 Min Read
Question 1: Are phone cheats killing the pub quiz?
News

Question 1: Are phone cheats killing the pub quiz?

7 Min Read
The 5 Best Mid-November Weekend Tech Deals: Save Up To 54% on AirPods, Laptops, Starlink, and More
News

The 5 Best Mid-November Weekend Tech Deals: Save Up To 54% on AirPods, Laptops, Starlink, and More

8 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?