Hello!
I am currently writing my master’s thesis where I am comparing the performance of iOS applications developed in Kotlin Multiplatform Mobile vs native Swift applications. To be able to compare them I need to optimize both compilations so that they are as comparable as possible. I have managed to optimize the Kotlin/Native compilation by adding the compiler option
-opt
to the
freeCompilerArgs
list in the
build.gradle.kts
file in the shared folder (execution time went from approx 1.4 to 0.33). Now, I have some questions:
1. What kinds of optimizations are made by adding
-opt
? (such as for instance “constant folding”, “dead code removal” etc.)
2. Are there other optimizations that I can apply?
I would appreciate any input or suggestions that you have as I struggle to find documentation or information on this. If you know any good resources, let me know!
Thanks!