How comparable is performance of Kotlin sequences ...
# announcements
d
How comparable is performance of Kotlin sequences vs Java streams? I'd like to prefer one or the other for consistency, and I usually go with sequences, as it looks more similar to the non-lazy API, good for single operations, and I find it's more flexible than streams. but is there a downside to using sequences over streams?
a
They are very similar. I'm not aware of any big downsides of Sequences compared to Streams
c
Kotlin sequences do not have parallel operation option. Although you can still do it with co-routines, it'll be more verbose than Java Streams. No idea about performance, I haven't tested.