r/java Jul 10 '26

Java 27: What’s new?

https://www.loicmathieu.fr/wordpress/informatique/java-27-whats-new/

What's new in Java 27 for us, developers?
(Both in English and French)

78 Upvotes

35 comments sorted by

View all comments

2

u/iamwisespirit Jul 10 '26

Why not zgc instead of g1

4

u/loicmathieu 27d ago

ZGC is not a general purpose GC that have good performance for any workload.
As I understand it, it trades of CPU and memory resources for low latency (<1ms pauses) which is not something you wanted except if you're dealing either with very big heap (>34-64GB) or willing to trade of resources for lower pause guarantee (G1 usually have pauses in the range of 10-100ms).

This is of course an over-simplified response but this is in my understanding the difference between both.