/Mastering-High-Performance-with-Kotlin

Mastering High Performance with Kotlin, published by Packt

Primary LanguageKotlinMIT LicenseMIT

Mastering High Performance with Kotlin

Mastering High Performance with Kotlin

This is the code repository for Mastering High Performance with Kotlin, published by Packt.

Find out how to write Kotlin code without overhead and how to use different profiling tools and bytecode viewer to inspect expressions of Kotlin language.

What is this book about?

The ease with which we write applications has been increasing, but with it comes the need to address their performance. A balancing act between easily implementing complex applications and keeping their performance optimal is a present-day requirement In this book, we explore how to achieve this crucial balance, while developing and deploying applications with Kotlin.

This book covers the following exciting features:

  • Understand the importance of high performance
  • Learn performance metrics
  • Learn popular design patterns currently being used in Kotlin
  • Understand how to apply modern Kotlin features to data processing
  • Learn how to use profling tools

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02. To run examples from this book, you will need a computer running Windows, Linux, or Mac OS. You also need IntelliJ IDEA (Ultimate edition version is preferable) and Android Studio. You need basic knowledge of GitHub and Git to clone a project with examples. Since Kotlin is an official language for Android development, Android Studio supports this language out of the box.

To build the project import it as Maven project in Intellij IDEA.

Project contains packages for each chapter that is splitted by sections:

Most of the examples contain a main function that can run by clicking the icon in the left gutter and choose the Run or Debug command.

Project also contains benchmarks that can be run using the following commands:

  1. Build a .jar file using this command at the root of the repository: mvn clean install
  2. To run the .jar with fast benchmarking: java -jar target/benchmarks.jar -wi 0 -i 1 -f 1 -tu ns -bm avgt To run the .jar with default benchmarking: java -jar target/benchmarks.jar

The code will look like the following:

public inline fun measureTimeMillis(block: () -> Unit) : Long {
    val start = System.currentTimeMillis()
    block()
    return System.currentTimeMillis() - start
}

Following is what you need for this book: This book is for Kotlin developers who would like to build reliable and high-performance applications. Prior Kotlin programming knowledge is assumed.

With the following software and hardware list you can run all code files present in the book (Chapter 1-10).

Software and Hardware List

Chapter Software required OS required
1-10 IntelliJ IDEA (Ultimate edition) Windows, Mac OS X, and Linux (Any)

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Related products

Get to Know the Author

Igor Kucherenko is an Android developer at Techery, a software development company that uses Kotlin as the main language for Android development. Currently, he lives in Ukraine, where he is a speaker in the Kotlin Dnipro Community, which promotes Kotlin and shares knowledge with audiences at meetups. You can find his articles about Kotlin and Android development on Medium and a blog for Yalantis, where he worked previously.

Suggestions and Feedback

Click here if you have any feedback or suggestions.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781788996648