The best garbage collectors, according to hackers
4 garbage collectors were recommended on Hacker News between November 2025 and November 2026. We rank them by how many separate people recommend each one, and 1 earns the Hacker Approved badge.
Top pick
The most recommended garbage collector with the badge. Each figure is one person. RecommendsCriticizes One comment
Very low or no GC pauses
People recommend ZGC for Java applications that need very low pause times, often under 1ms. The usual caveat is that it gives up some throughput for that latency.
All 4 garbage collectors, ranked
Select a column heading to sort. Approval share is recommenders out of everyone who gave an opinion; the tick on each bar marks the 2 to 1 line the badge needs. Months counts the months, out of 13, in which someone recommended it.
| Rank | |||||||
|---|---|---|---|---|---|---|---|
| 1 | ZGC garbage collector | 17 | 7 | 71% | 10 | — | Approved |
| 2 | G1 garbage collector | 6 | 1 | 86% | 5 | — | — |
| Tied 3 | Boehm GC | 5 | 5 | 50% | 4 | — | — |
| Tied 3 | Parallel GC (OpenJDK) | 5 | 2 | 71% | 4 | — | — |
How we rank
Rank is the number of separate people who recommend a product in a Hacker News comment over the past year. Someone who praises the same garbage collector in five threads counts once.
The badge goes to garbage collectors that at least 10 people recommend, with recommenders outnumbering critics at least 2 to 1, recommended in at least 4 of the 13 months.
Rankings are never for sale. We may earn a commission when you buy through our links. It never changes the order.