Hi all. I’m working with a `List<DataPoint>`...
# compose-ios
m
Hi all. I’m working with a
List<DataPoint>
of ~30K items and running a series of transformations (grouping, associate, map, filter, etc.). On the JVM this completes in under 2 seconds, but on iOS it takes around 40 seconds. I checked with Codex, and it suggested that object allocations, especially intermediate lists can be quite expensive in Kotlin/Native. Given how far KMP has come, I suspect I might be structuring these transformations in a suboptimal way for Native. Has anyone run into similar performance differences on iOS? Are there recommended approaches to minimize overhead like reducing intermediate collections, using sequences, or favoring in-place operations? Any guidance or real-world examples would be really helpful.
j
are you using "fast" collection alternatives ?
those fastMap fastFilter etc ?
a
Hi! This looks like an interesting benchmark for Kotlin. Could you please share the pease of the code that does that?
Regarding the tips - without fully understanding the issue, I can suggest only the basic ones: "don't use extra allocations" and "test performance in release mode"