ilya.gorbunov07/23/2019, 5:51 PM
library — 0.2 Thanks to the great effort of @Abduqodiri Qurbonzoda [JB] we now have modern and efficient implementations of persistent collections rewritten from scratch. That allowed us to improve performance characteristics of many collection operations. See more details in the changelog: https://github.com/Kotlin/kotlinx.collections.immutable/releases/tag/v0.2 Another notable change is that we have split each collection interface there into two parts: an
that merely extends a read-only
and adds a contract of immutability on top of it, and a
that additionally provides modification operations and builders. We encourage you to try it and share your feedback, but note that the library is still pre-release, so the API and implementations can change in future. Currently this library is provided only for JVM, but our next short term plan is turning it into a multiplatform one.
Ruckus07/23/2019, 8:50 PM
etc. return these instead of using mutable collections under the covers? Or will these stay in
elizarov07/23/2019, 9:33 PM
Tom Prior07/24/2019, 8:14 AM
Tuan Kiet07/27/2019, 10:16 AM
karelpeeters07/27/2019, 1:30 PM
you promise that you won't modify it, but the caller doesn't promise anything. For the persistent collections, it's nice to be able to do do things like
list1 + list2
without having terrible performance because of all of the copying.
for (x in list1 + extra)