Performance of Kotlin Applications
Performance of Kotlin Applications
Summary:
The book "Performance of Kotlin Applications" is a comprehensive guide to creating fast, efficient, and scalable applications in the Kotlin language. The author, Alexey Petrov, shares practical optimization methods based on years of experience developing high-load systems.
What is this book about?
Unlike most textbooks that teach you to write "working code," this book focuses on how to make code fast. You will learn:
- How the Kotlin compiler and JIT compilation work in the context of the JVM;
- Profiling methods: from simple measurements to using professional tools (IntelliJ Profiler, YourKit, JFR);
- Memory management: garbage collection, leaks, allocation optimization;
- Performance specifics in Kotlin/Native and Kotlin/JS;
- Benchmarking and writing performance tests with JMH;
- Design patterns that affect speed (inline functions, value classes, Sequences vs Collections);
- Optimizing coroutines and asynchronous code.
Who is this book for?
- Java/Kotlin developers transitioning to Kotlin and wanting to avoid costly mistakes;
- Server application developers working with high loads;
- Mobile Android developers aiming to reduce power consumption and response time;
- Tech leads responsible for product architecture and SLAs.
What will you learn after reading?
- How to find bottlenecks in code using a profiler;
- Why some Kotlin constructs (e.g., lazy delegation) can be slower than they seem;
- How to properly use inline functions and reified types without losing performance;
- Secrets of configuring the garbage collector for Kotlin applications;
- How to write benchmarks that don't lie.
The book contains many real-world examples, performance graphs, and ready-made optimization recipes. The material is suitable for both JVM (Kotlin/JVM) and native platforms (Kotlin/Native).
"Performance is not a feature, but an inherent quality of a program. This book will help you embed it from the very first lines of code" — Alexey Petrov.