~/talk

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

Talkat GeeCON 2019 · 2019-05-15..05-17· [java]
slides:none on file

Shows measured JDK behaviors and concrete costs: JMH benchmarks and jcmd scans show + faster than StringBuilder since Java 9 for mixed concatenation, compact-strings use a byte[] with a coder so non‑Latin text can double memory, and a String+char[] pair often costs ~64 bytes so String Deduplication requires G1 and -XX:+UseStringDeduplication to save ~40 bytes per duplicate. Demonstrates a hash‑collision exploit where many zero‑hash strings make HashMap lookups linear and how Java 7 alt‑hashing and Java 8 tree bins mitigate it: hash-code-zero attack makes HashMap lookup linear.

AI-written summary · about

  1. 0:00Start
  2. 6:25Java 1 1
  3. 16:07Java 1 4
  4. 19:43Compressed Strings
  5. 23:51Java 8
  6. 27:30Joining Strings
  7. 30:08Java 9
  8. 31:53Deduplication
  9. 34:38String Table
~/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.