ms
05/01/2026, 5:44 AMList<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.Jiri Bruchanov
05/01/2026, 8:18 AMJiri Bruchanov
05/01/2026, 8:18 AMAndrei Salavei
05/05/2026, 9:13 AMAndrei Salavei
05/05/2026, 9:16 AM