~/talk

Five Java Features You Didn’t Know About

Talkat Jfokus 2019 · 2019-02-04..02-06· [java]
github:minborg
slides:none on file

Five concrete JVM tricks and when they matter: the JIT uses stack allocation via escape analysis and inlining so temporary StringBuilder/String objects disappear after ~10k–50k iterations, cutting transient allocations to zero; microbenchmarks require warmup, blackhole/consumeCPU guards and JMH-like harnesses to avoid dead-code collapse; custom streams can short-circuit and be merged into SQL for O(1) paging; and large datasets run off-heap with ByteBuffer serializers and in-place aggregators to hold terabytes with minimal GC impact.

AI-written summary · about

  1. 0:00Start
  2. 1:38Outline
  3. 2:01Allocate Local Objects on the Stack
  4. 2:30The Problem
  5. 5:00Allocate Objects on Stack Rather Than on Heap
  6. 6:15What Happened?
  7. 7:44Fast Facts: Stack Allocation
  8. 11:23Micro Benchmarks - JMH
  9. 13:57JMH Helps Controlling the Environment
  10. 15:41Consuming CPU - Blackhole Example
  11. 17:28Benchmark Code - Consume Results
  12. 18:09Benchmark Code - parallel
  13. 19:37Micro Benchmarks - Wrap Up
  14. 20:29Short-Circuit Java Streams
  15. 21:21Declarative Constructs
  16. 30:01Allocating Memory Off Heap
  17. 30:49ByteBuffer vs. Unsafe
  18. 32:19Read Performance Reading a Byte
  19. 32:50Consider Using ByteBuffer over Unsafe
  20. 37:05Speedment: DataStore
  21. 37:59Ultra-Low Latency for Terabytes of Data
  22. 38:21Ultra-Low Latency (Lower is Better)
  23. 39:42Solution: Off-Heap Maps
  24. 40:08Example - Average Salary per Age Group
  25. 41:37Speedment Aggregations with Expressions
  26. 41:55Speedment Aggregations Performance
  27. 43:26Speedment Aggregations from DataStore
~/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.