Kotlin / kotlinx.collections.immutable

Immutable persistent collections for Kotlin
Apache License 2.0
1.12k stars 56 forks source link

Don't allocate temporary buffer in SmallPersistentVector.removeAll #136

Closed mcpiroman closed 6 months ago

mcpiroman commented 1 year ago

Actually we can avoid the buffer altogether and use 32-bit mask to track retained/removed elements.

Alternative to #134

Again, I don't know which one is faster as I don't run the actual benchmarks

qurbonzoda commented 6 months ago

Moved review here: https://github.com/Kotlin/kotlinx.collections.immutable/pull/164