Tagged articles
2 articles
Page 1 of 1
Alibaba Cloud Developer
Alibaba Cloud Developer
Aug 29, 2024 · Fundamentals

How Java’s String Concatenation Evolved: From '+' to Hidden Classes

This article traces the evolution of Java string concatenation from the simple '+' operator through JDK 8’s StringBuilder implementation, the JDK 9+ StringConcatFactory with invokedynamic, and Alibaba’s PR 20273 that introduces hidden‑class bytecode generation, highlighting performance gains and startup‑time improvements.

JDKMethodHandlesOpenJDK
0 likes · 17 min read
How Java’s String Concatenation Evolved: From '+' to Hidden Classes
Alibaba Cloud Developer
Alibaba Cloud Developer
Dec 29, 2022 · Fundamentals

How to Achieve Zero‑Copy String Construction Across JDK Versions

This article explains the internal differences of Java's String implementation from JDK 8 to JDK 9+, demonstrates how to use sun.misc.Unsafe and trusted MethodHandles.Lookup to build zero‑copy String objects, and provides practical code examples for high‑performance string handling.

MethodHandlesStringZeroCopy
0 likes · 12 min read
How to Achieve Zero‑Copy String Construction Across JDK Versions