Prestandautvärdering av Kotlin Multiplatform på iOS : Jämförelse av Kotlin och Compose Multiplatform med native Swift för UI-rendering och hårdvaruinteraktioner
Cross-platform development is becoming increasingly popular because it allows code reuse between Android and iOS. In contrast, native development typically requires maintaining separate codebases for each platform. Kotlin Multiplatform enables shared business logic, while Compose Multiplatform extends this to the user interface. However, cross-platform solutions are often associated with lower performance, and the performance of Kotlin and Compose Multiplatform on iOS remains relatively unexplored. Therefore, this thesis evaluates the performance of Kotlin and Compose Multiplatform on iOS in comparison to native Swift. The study focuses on hardware-related operations and UI rendering. To evaluate this, two functionally equivalent applications are implemented, each including six benchmarks: three hardware focused and three UI focused. The performance metrics are execution time, CPU usage, memory consumption, frames per second, and delayed frames. The results show that Kotlin Multiplatform has comparable CPU usage to native Swift in the hardware benchmarks but consumes significantly more memory. Execution time results are mixed, varying by task. In the animation benchmarks, Compose Multiplatform consistently uses more CPU and exhibits frame delays during more complex animations, whereas the native implementation maintains perfect performance with no delayed frames. These findings suggest that Kotlin and Compose Multiplatform are suitable for applications with simple animations and moderate performance requirements, but cannot compare to native Swift in more complex scenarios. The main contributions of this thesis are a reproducible benchmarking methodology and empirical data that can assist developers and organizations in choosing an appropriate development strategy for cross-platform applications.
Publication Details
- Journal
- KTH Publication Database DiVA (KTH Royal Institute of Technology)
- Published
- 2025-01-01
- Primary Topic
- Geochemistry and Geologic Mapping
- Type
- article
- Field-Weighted Citation Impact
- 0.00