JEP 254: Compact Strings - length limits

John Rose john.r.rose at
Tue Sep 6 22:09:38 UTC 2016

On Sep 6, 2016, at 2:18 PM, Tim Ellison <t.p.ellison at> wrote:
> People stash all sorts of things in (immutable) Strings. Reducing the
> limits in JDK9 seems like a regression.  Was there any consideration to
> using the older Java 8 StringCoding APIs for UTF-16 strings (already
> highly perf tuned) and adding additional methods for compact strings
> rather than rewriting everything as byte[]'s?

It doesn't help now, but
proposes a better way to stash immutable bits, CONSTANT_Data.
(Caveat:  Language bindings not yet included.)  Eventually we'll get there.

— John

More information about the core-libs-dev mailing list