~/talk

Let’s Get to the Rapids: Java 8 Stream Performance

Talkat Philly ETE 2015 · 2015-04-07..04-08· [java]
slides:none on file

Argues that sequential Java 8 streams usually match or beat hand-written loops but parallel streams only help when the data source is efficiently splitable and per-element work is large enough to offset setup overhead. Reproduces grep -b with a custom LineSpliterator over a mapped byte buffer, shows combiner-heavy collectors and streaming IO defeat parallelism, and reports a practical 2.5× speedup on 4 hardware threads when those conditions hold. Recommends profiling order, watching GC/IO, and using Google Caliper / the Java benchmarking harness; notes fork-join setup cost ~100 µs.

AI-written summary · about

  1. 0:00Introduction and speaker background
  2. 10:03Microbenchmarking challenges
  3. 27:33Case study: Grep-B implementation
  4. 38:12Parallel streams and splitters
  5. 49:00When to use parallel streams
  6. 53:37Q&A session
~/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.