Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering High Performance with Kotlin

You're reading from   Mastering High Performance with Kotlin Overcome performance difficulties in Kotlin with a range of exciting techniques and solutions

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781788996648
Length 316 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Igor Kucherenko Igor Kucherenko
Author Profile Icon Igor Kucherenko
Igor Kucherenko
Arrow right icon
View More author details
Toc

Ranges and Identifying Performance Issues

A range represents an interval or a set of real values. Each value in this set lies between two other values, which represent the start and the end of the range. Kotlin has classes that represent ranges and functions for its creation.

There are three common types of range:

  • A range of variables: A set of values defined by start and end values (for instance, the range -3 to 3 includes -3, -2, -1, 0, 1, 2, and 3)
  • The range of an array: A range that's bound by the first and last values of an array
  • The range of an iterator: This means that the range can be iterated over each value

In this chapter, we will cover the following topics:

  • Ranges in Kotlin
  • Range benchmarking
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime