Add compact-strings module: Compact Strings (JEP 254) measured with JOL on JDK 25, with and without -XX:-CompactStrings, and compact object headers on 25 vs 27

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KqJyCidz3ZgRyHABv2GVJh
This commit is contained in:
2026-10-01 04:23:27 +00:00
co-authored by Claude Sonnet 5.5
parent fadfd05670
commit fc05eed4b5
26 changed files with 943 additions and 0 deletions
@@ -0,0 +1,9 @@
$ java -Xmx3g -XX:-UseCompactObjectHeaders MillionStrings (JDK 27)
java.version = 27
strings : 1,000,000 (average 42.50 chars)
coder == 0 (LATIN1) in set A : 1,000,000
coder == 1 (UTF16) in set B : 1,000,000
# WARNING: Unable to attach Serviceability Agent. sun.jvm.hotspot.runtime.VM.isCompressedKlassPointersEnabled()
A: lower-case ASCII only : 89,844,680 bytes (89.8 MB, 89.8 bytes per string)
B: same + one euro sign : 133,839,824 bytes (133.8 MB, 133.8 bytes per string)
B / A : 1.490