# When to Use Sequences

DevFeed: [When to Use Sequences](<https://devfeed.tech/articles/when-to-use-sequences-25045.md>)

Original publisher: [Read original article](<https://typealias.com/guides/when-to-use-sequences/>)

Author: author@typealias.com (Dave Leeds)

Published: 2019-09-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Streams](<https://devfeed.tech/topics/streams.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [collections](<https://devfeed.tech/tags/collections.md>), [guide](<https://devfeed.tech/tags/guide.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [performance](<https://devfeed.tech/tags/performance.md>), [programming](<https://devfeed.tech/tags/programming.md>), [sequences](<https://devfeed.tech/tags/sequences.md>), [series](<https://devfeed.tech/tags/series.md>), [stateful](<https://devfeed.tech/tags/stateful.md>), [stateless](<https://devfeed.tech/tags/stateless.md>), [streams](<https://devfeed.tech/tags/streams.md>)

## AI overview

A tutorial comparing Kotlin sequences with normal collections and Java streams. It explains performance trade-offs, including how operation-chain length and intermediate collections can affect efficiency, while emphasizing that benchmarks with realistic data are needed for specific code.

## Source excerpt

One of the most common questions I get about Kotlin's sequences is this: "When should I use sequences, and when should I use normal collections?" That's the question we're going to answer in this third and final article in this series! We're going to look at the trade-offs of each, including the main things that affect their performance. Then, we'll look at how Kotlin's sequences stack up against Java streams, a similar concept.