~/talk

Efficient Kotlin

Talkat droidcon Berlin 2021 · 2021-10-20..10-22· [kotlin, web-performance]
slides:none on file

Kotlin tips for real savings: object headers cost about 12 bytes header so boxed Integers use 5–6x memory cost versus primitives, JVM caches small Integers and libraries like Caffeine cache avoid naive memory bloat, prefer inline functions to remove lambda-call overhead, use JVM inline/value classes to encode units without runtime wrappers, prefer sequences for large pipelines (tens of thousands of items) and array-of-primitives for dense numeric data, clear lazy initializers to prevent hidden leaks, and prefer groupingBy over groupBy to avoid many intermediate lists.

AI-written summary · about

  1. 0:00Introduction to efficient Kotlin
  2. 1:07Object creation overhead
  3. 3:13Avoiding unnecessary objects
  4. 7:26Lifting heavy computations
  5. 9:35Inlining function calls
  6. 13:48Unit safety with inline classes
  7. 19:30Preventing memory leaks
  8. 23:54Efficient collection processing
  9. 28:35Sequences vs iterables
  10. 31:49Optimizing collection lookups
  11. 34:41Grouping vs groupBy
  12. 35:45Arrays for performance
  13. 36:26Mutable vs read-only collections
  14. 37:30Resources and closing
~/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.