~/talk

We Are All Gathered — We Are All to Gather

TalkinFrenchat Devoxx France 2024 · 2024-04-17..04-19· [java]
github:forax
slides:none on file

Java 22 adds a preview gather() operation and a Gatherer API for writing custom intermediate Stream operations (both stateless and stateful, short‑circuitable, and usable in parallel or forced sequential). The talk demonstrates reimplementing filter, takeWhile, limit and window/grouping by providing initializer/combiner/finisher and downstream push semantics, and presents JMH benchmarks on 100,000 strings comparing map (481 ms) to a gather‑based map (552 ms). It also explains current limitations: no primitive specialization, lack of propagation of stream characteristics, and cases where parallel execution and optimizations fail.

AI-written summary · about

  1. 0:00Introduction
  2. 1:24Java streams explained
  3. 4:15Gazers principle
  4. 8:10Integrator interface details
  5. 13:08Filter example
  6. 18:30Short-circuiting and optimizations
  7. 21:20takeWhile implementation
  8. 24:56Stateful limits and combiner
  9. 27:04Grouping elements
  10. 33:22Parallel vs sequential
  11. 34:25Key functions summary
  12. 37:41JMH performance tests
  13. 41:12Typing issues and optimizations
  14. 44:07map vs reduce comparison
  15. 46:34Primitive type specialization
  16. 47:20Conclusion and call to action
~/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.