<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/performance-improvements-in-jdk-27-i7t45e1f4" -->

---
title: Performance Improvements in JDK 27 | daily.dev
description: JDK 27 brings over 2,300 commits of performance work across libraries, garbage collectors, the JIT compiler, and the runtime. Compact Object Headers are now...
canonical: https://daily.dev/posts/performance-improvements-in-jdk-27-i7t45e1f4
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Performance Improvements in JDK 27 | daily.dev
og:description: JDK 27 brings over 2,300 commits of performance work across libraries, garbage collectors, the JIT compiler, and the runtime. Compact Object Headers are now...
og:url: https://daily.dev/posts/performance-improvements-in-jdk-27-i7t45e1f4
og:image: https://api.daily.dev/og/posts/I7t45E1F4.png
og:image:alt: Performance Improvements in JDK 27
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Performance Improvements in JDK 27

**[Inside Java](https://daily.dev/sources/inside_java)** · 11 min read · 0 upvotes · 0 comments

## Summary

JDK 27 brings over 2,300 commits of performance work across libraries, garbage collectors, the JIT compiler, and the runtime. Compact Object Headers are now enabled by default, shrinking object headers from 12 to 8 bytes, and G1 becomes the default garbage collector everywhere via JEP 523. HashMap bulk-copy paths, AttributedString, URL.toString(), and file I/O got targeted optimizations with double-digit percentage gains in JMH benchmarks. Cryptographic code sees architecture-specific intrinsics for AES, SHA-3, and ML-KEM, and the C2 compiler gains new vectorization and constant-folding capabilities. Lazy Constants (JEP 531) return for a third preview round, and the Object Monitor Table is now on by default with a transitional flag to disable it. The piece closes with upgrade advice recommending isolated testing of the new defaults.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://inside.java/2026/09/28/performance-update-jdk27>

## Questions this post answers

### Is G1 the default garbage collector in JDK 27 even for small containers and single-processor machines?

Yes, JEP 523 makes G1 the default garbage collector everywhere in JDK 27, including small containers, single-processor environments, and development machines that previously fell outside the server-class heuristic and defaulted to Serial GC. This is a consistency change rather than a claim that G1 suits every workload, and Serial GC remains available via -XX:+UseSerialGC.

_Teams planning a JDK 27 upgrade can use daily.dev to track garbage collector default changes before rollout._

### What are Compact Object Headers in JDK 27 and how much memory do they save?

Compact Object Headers, enabled by default in JDK 27 via JEP 534, shrink every object header on a typical 64-bit HotSpot configuration from 12 bytes to 8 bytes. Benchmarks cited during the feature's production-ready milestone showed 22% lower heap usage, 8% lower CPU usage in one SPECjbb2015 configuration, 15% fewer collections, and about 10% lower runtime in a JSON parser benchmark. They can be disabled with -XX:-UseCompactObjectHeaders.

_Developers weighing memory savings against compatibility risk can follow JVM header changes like this on daily.dev._

### How much faster is HashMap.putAll() in JDK 27 compared to earlier versions?

JDK 27 adds specialized copy paths (JDK-8371656) for when the source is exactly a HashMap or an unmodifiable map backed by one, avoiding iterator overhead and repeated hash-code calculation. On AWS Graviton benchmarks with call sites exposed to five Map types, operation-time reductions ranged from 61% for a five-entry HashMap to 86% for an unmodifiable 150-entry HashMap, falling from about 10,593 ns/op to 1,533 ns/op.

_Java developers benchmarking collection performance can track JDK runtime optimizations like this on daily.dev._

## Similar posts on daily.dev

- [Performance Improvements in JDK 26](https://daily.dev/posts/performance-improvements-in-jdk-26-2dhfwn7ad) · Baeldung · 7 upvotes · 0 comments
- [Java 27: What’s New?](https://daily.dev/posts/java-27-what-s-new--usmks8zda) · Foojay.io · 29 upvotes · 0 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#java](https://daily.dev/tags/java)

[View this post on daily.dev](https://daily.dev/posts/performance-improvements-in-jdk-27-i7t45e1f4)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Performance Improvements in JDK 27","url":"https://daily.dev/posts/performance-improvements-in-jdk-27-i7t45e1f4","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/performance-improvements-in-jdk-27-i7t45e1f4"},"datePublished":"2026-09-28T06:51:52.149Z","dateModified":"2026-09-28T06:52:53.893Z","description":"JDK 27 brings over 2,300 commits of performance work across libraries, garbage collectors, the JIT compiler, and the runtime. Compact Object Headers are now...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8a590c6abfe6299c110ce5c325f2383e?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8a590c6abfe6299c110ce5c325f2383e?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Inside Java","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Inside Java","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/de5992d95f374790bdfd2ae03a16f6e3","url":"https://daily.dev/sources/inside_java"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/performance-improvements-in-jdk-27-i7t45e1f4","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"performance,java","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Inside Java","item":"https://daily.dev/sources/inside_java"},{"@type":"ListItem","position":3,"name":"Performance Improvements in JDK 27"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/performance-improvements-in-jdk-27-i7t45e1f4#faq","mainEntity":[{"@type":"Question","name":"Is G1 the default garbage collector in JDK 27 even for small containers and single-processor machines?","acceptedAnswer":{"@type":"Answer","text":"Yes, JEP 523 makes G1 the default garbage collector everywhere in JDK 27, including small containers, single-processor environments, and development machines that previously fell outside the server-class heuristic and defaulted to Serial GC. This is a consistency change rather than a claim that G1 suits every workload, and Serial GC remains available via -XX:+UseSerialGC. Teams planning a JDK 27 upgrade can use daily.dev to track garbage collector default changes before rollout."}},{"@type":"Question","name":"What are Compact Object Headers in JDK 27 and how much memory do they save?","acceptedAnswer":{"@type":"Answer","text":"Compact Object Headers, enabled by default in JDK 27 via JEP 534, shrink every object header on a typical 64-bit HotSpot configuration from 12 bytes to 8 bytes. Benchmarks cited during the feature's production-ready milestone showed 22% lower heap usage, 8% lower CPU usage in one SPECjbb2015 configuration, 15% fewer collections, and about 10% lower runtime in a JSON parser benchmark. They can be disabled with -XX:-UseCompactObjectHeaders. Developers weighing memory savings against compatibility risk can follow JVM header changes like this on daily.dev."}},{"@type":"Question","name":"How much faster is HashMap.putAll() in JDK 27 compared to earlier versions?","acceptedAnswer":{"@type":"Answer","text":"JDK 27 adds specialized copy paths (JDK-8371656) for when the source is exactly a HashMap or an unmodifiable map backed by one, avoiding iterator overhead and repeated hash-code calculation. On AWS Graviton benchmarks with call sites exposed to five Map types, operation-time reductions ranged from 61% for a five-entry HashMap to 86% for an unmodifiable 150-entry HashMap, falling from about 10,593 ns/op to 1,533 ns/op. Java developers benchmarking collection performance can track JDK runtime optimizations like this on daily.dev."}}]}
```

