DEV Community

Discussion on: How Efficient List Operators Work in Kotlin

Collapse
 
cout970 profile image
cout970

Good post, only one note, you call this version "efficient", which following you definition is correct, but I miss a real comparison between the 2 approaches because not always Sequences are faster than direct List operations. There is a reason why direct List operations are the "default" in a lot of cases.

Collapse
 
lalunamel profile image
Cody Sehl

Thanks - I enjoyed writing it!

Yep, I was careful to only make claims about my very narrow definition of efficient.

Were you looking for something along the lines of "In this situation, you should use List instead of Sequence because..."?

Collapse
 
cout970 profile image
cout970

yeah, basically