Is scala code slow?
summary
Claims are concrete: a one-line Scala rewrite can be measurably slower (author shows a 3× example) and small edits yield 4–7× gains. Demonstrations include JMH and perf-guided assembly dumps, HotSpot behaviours like loop unrolling at 16, bytecode vs assembly for pattern matching and tail calls, and collection pitfalls where boxing causes gigabytes/sec of GC churn. Examples compare while loops, pattern match, tail recursion and Scala collections across Scala 2.11/2.12 so you see what was built and what actually worked.
AI-written summary · about
chapters (14)
- 0:00Start
- 4:28HIT THE COMPILE BUTTON
- 7:17IF VS PATTERN MATCHING
- 12:09WHAT ABOUT OPTIONS?
- 15:52MEET FIBONACCI
- 17:49BYTECODE TO THE RESCUE!
- 18:15FIBONACCI WITH TCO
- 24:39LOOP UNROLL
- 30:07LOOP PERF COUNTERS
- 30:49LIST VS ARRAY
- 32:23GC PROFILING RESULTS
- 32:43APPLES VS ORANGES
- 35:522.11 DESUGARED
- 41:07THE END
related talks
54mThe Things Scala js Does to Make Your Code Fast
35mFast startup & low latency: pick two
42mFaster Scala Collections with Scalaxy/Streams!
49mNumbers every Scala programmer should know
30mThe Future of Scala Performance on Big Data
40mLudicrous Speed: Designing For Performance on the JVM
43mDotty Linker: Precise Types Bring Performance
39mMemory Efficient Java
