~/talk

10 TIPS TO WRITE FAST STACK-SAFE FUNCTIONAL CODE IN SCALA

Talkat Scalar 2020 · on Friday, 2020-05-15· [functional-programming]
slides:none on file

10 concrete tips for fast, stack-safe Scala: production-built Auto-Batch automatically batches per-leg API calls to remove redundant requests and restore performance, but revealed timeouts and JVM stack overflows at deep recursion. Solutions include writing a tailored algebraic data type and evaluator, using continuation-passing style plus a trampoline interpreter to eliminate stack growth, applying smart constructors to simplify structures early, and profiling on real production data to catch optimizations that cost more than they save.

AI-written summary · about

  1. 0:00Intro
  2. 3:48The Context: Logistics
  3. 4:17The Problem: Going from A to Z.
  4. 9:42Benefits / Drawbacks
  5. 15:38Abstraction + Implementation Abstractions must be Abstract
  6. 16:53Use Smart Constructors!
  7. 19:29Timeouts?! Where???
  8. 20:24Profile on Production Data!
  9. 21:45Fear The Big-Bad-Stack-Overflow!
  10. 23:09Uh-Oh Meet the FP Nemesis: the Stack Overflow!
  11. 28:46Defunctionalization: Functions As Data
  12. 35:07Mutual Recursion
  13. 36:44Trampolines
  14. 39:47Fibonacci: Final Version
  15. 41:33Defer is your friend!
  16. 45:14Tips N°3: Write your own Dedicated Data Types
~/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.