I tested that Kotlin/Native has poor performance o...
# compose-ios
g
I tested that Kotlin/Native has poor performance on iOS. For example, the most commonly used Matrix class needs to call the floatArrayOf function to construct it, but this function takes ten times as long on iOS as on Android. Will the performance problems of Kotlin/Native cause Compose to not always get a better experience on iOS? Test Code
Copy code
val time = measureTime {
        repeat(10000) {
            floatArray = floatArrayOf(
                1f, 0f, 0f, 0f,
                0f, 1f, 0f, 0f,
                0f, 0f, 1f, 0f,
                0f, 0f, 0f, 1f
            )
        }
    }
    println("timeTest = $time")
d
Thanks for the research! We will invest in this direction. We communicate with the Kotlin Native team about performance issues in Compose on UIKit target.
g
Thanks, I'm really looking forward to having a smooth experience with Compose on iOS.
https://app.slack.com/client/T09229ZC6/C3SGXARS6/thread/C3SGXARS6-1670313053.796279 Hello, regarding this issue, you can follow the discussion here, it should be helpful.
a
111 Views