~/talk

Enough java.lang.String to Hang Ourselves...

Talkat Oracle Code One 2018 · 2018-10-22..10-25· [java]
slides:none on file

Benchmarks compare "" + 42, Integer.toString and StringBuilder and show performance depends on JVM version not intuition, with Java 9+ using invokeynamic concatenation strategies where the default path allocates ~152 bytes while the old Java 5 pattern uses ~500 bytes and is ~2x slower. Memory tests show G1 String Deduplication can save roughly 40 bytes per duplicate and intern() is dangerous because the intern table is fixed. Java 7 removed substring sharing causing many char[] copies, and Java 9 replaces char[] with compact strings (byte[] + coder) which changes allocation and intrinsics behavior. GitHub repo contains the benchmarks.

AI-written summary · about

  1. 0:00Start
  2. 2:55The Dark Ages
  3. 4:48Hash Code
  4. 18:16Compressed Strings
  5. 23:03Alternative Hashing Function
  6. 26:43Java 8
  7. 33:41Compact Strings
  8. 34:48String Concatenation
  9. 35:46Data Benchmarks
  10. 40:47Performance
  11. 41:30Byte Array
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.