Enough java.lang.String to Hang Ourselves ...
summary
Benchmarks compare ""+42, StringBuilder and Integer.toString, showing concatenation wins on modern JDKs only after recompilation and invokedynamic optimizations; older JDK6 shows linear HashMap slowdown when many keys share hash code zero, Java7 adds randomized hashing, Java8 turns collision chains into trees improving lookups. G1 String Deduplication and compact strings (Latin‑1 bytes) cut memory but can change max string size and performance; substring used to share backing arrays, now copies; String.format stays very slow and often allocates heavily.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 0:23Java string basics
- 2:05String concatenation quiz
- 3:21Early Java string history
- 6:11Java 1 & 2 changes
- 8:10String performance idioms
- 10:48Java 6 hashmap security
- 14:48Java 4 & 5 enhancements
- 17:20Java 6 update optimizations
- 18:52Java 7 hashcode changes
- 22:12Substring memory leaks
- 24:00Java 8 hashmap trees
- 25:55G1 GC deduplication
- 27:20String interning table
- 29:42Java 9 compact strings
- 30:28Benchmarking concatenation
- 33:48JDK 9 dynamic concatenation
- 36:53Impact of compact strings
- 39:03String intrinsic methods
- 40:59Vectorized string equals
- 43:25Final lessons and takeaways
- 45:52Q&A and closing
related talks
46mEnough java.lang.String to Hang Ourselves...
46mEnough java.lang.String to Hang Ourselves ...
09mString Enhancements in JDK 9
40mWhat Every Java Programmer Should Know About Strings
51mRethinking Java String Concatenation
01h 02mCompact Strings
45mHow difficult can it be to write efficient code?
41mJava 24, Faster Than Ever
