Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Micro-Optimization for Fun and Profit - Scala Days Seattle

Scala Days Conferences via YouTube

Overview

Explore micro-optimization techniques for critical path performance in Scala applications during this conference talk from Scala Days 2023 Seattle. Delve into the fundamentals of JVM, hardware, and Scala compiler operations to write dramatically faster code without sacrificing functionality. Learn about physical factors, layers of abstraction, and the characteristics of slow and fast code. Discover pro tips for implementing IO, measuring performance with SBT and JMH, and conducting micro benchmarks. Examine allocation-free stacks, continuation stacks, dynamic arrays, and array operations. Understand the intricacies of micro benchmarks and their potential pitfalls. Investigate optimization strategies, including encoding results, pattern matching, if-else statements, deftag, and invoke virtual. Gain insights into achieving faster performance with practical examples and key takeaways for effective micro-optimization in Scala and JVM-based applications.

Syllabus

Intro
Dont microoptimize
Simplified IO
GitHub
Physical Factors
Layers of abstraction
Happy paths and unhappy paths
What is slow
What is fast
Pro tip
Implementing IO
IO Fiber
IL Fiber
Run
Continue
Async
Measuring
SBTJMH
Micro Benchmarks
Micro Optimizations
Allocation Free Stack
Continuation Stack
Dynamic Arrays
Array Stack
Array Copy
Benchmarks
Why did it get worse
The results
Why I tried different array bounds
The problem with micro benchmarks
Optimization for fun
The answer
The solution
Bias
Allocation Free Results
Encoding
Results
Pattern Matching
If Else
Deftag
Invoke Virtual
More Stack Less Game
Current
Faster
Takeaways

Taught by

Scala Days Conferences

Reviews

Start your review of Micro-Optimization for Fun and Profit - Scala Days Seattle

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.