Performance Evaluation of Kotlin Multiplatform Mobile and Native iOS Development in Swift

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Abstract: Today's mobile development resides in the two main operating systems Android and iOS. It is popular to develop mobile applications individually for each respective platform, referred to as native development. To reduce additional costs, cross-platform solutions have emerged that enable shared development for both platforms. Kotlin Multiplatform Mobile (KMM) is a relatively unexplored cross-platform tool developed by JetBrains. The purpose of this study is to evaluate the performance of iOS applications developed in KMM compared to native Swift. We compare the two approaches for developing iOS apps by compiling a benchmark suite and measuring the performance metrics execution time, memory consumption, and CPU usage. Our benchmark suite is a collection of 7 benchmarks consisting of high-level functionalities networking and database management, as well as low-level computational tasks from the Computer Language Benchmarks Game (CLBG) suite. For the studied benchmarks, the results indicate that KMM generally achieves faster execution times, as higher memory consumption and CPU usage. but with a trade-off overhead in higher memory consumption and CPU usage. We have found KMM to achieve up to 2,7 seconds faster execution time, consume up to 390MB more memory, and up to 30% more CPU than with native Swift. libraries achieve faster execution times, but with a trade-off overhead in increased memory consumption and CPU usage. Besides, our results highlight correlations between the garbage collection cycles of KMM with profiling patterns of memory consumption and CPU usage. the specific benchmark implementations analyzed, and the device used to benchmark them. studies are therefore needed to further generalize our conclusions.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)