Performance Study of Kotlin and Java Programs with Bytecode Analysis
この論文をさがす
説明
Kotlin is a newly proposed programming language that is highly compatible with Java. Typically, source code written in Kotlin is compiled into Java bytecode, which is then interpreted and executed by the Java Virtual Machines (JVMs). To achieve high performance, the codes (source code or bytecode) must be optimized for the existing Java virtual machines. In this paper, we evaluate the performance of loop processing in Kotlin and Java programs considering the existing JVM implementations. First, we perform micro-benchmarking of loop processing, such as for and while statements, using two popular JVM implementations. The results show that the performance depends on the description methods even for the same semantics. The performances can be classified into two groups: fast and slow, in both JVM implementations. Second, we compare the bytecodes generated by the compilers from the description methods of the fast and slow groups. We then show the differences between them, which are small and cannot be justified as the direct cause of a significant performance difference. Third, we compare the native codes generated by a just-in-time (JIT) compiler and show that the bytecode in the fast group is deeply optimized by the JIT compiler, while that in the slow group is not. In fact, small differences in the bytecode lead to differences in the behavior of the JIT compiler and to non-trivial performance gains. ------------------------------ This is a preprint of an article intended for publication Journal of Information Processing(JIP). This preprint should not be cited. This article should be cited as: Journal of Information Processing Vol.32(2024) (online) ------------------------------
Kotlin is a newly proposed programming language that is highly compatible with Java. Typically, source code written in Kotlin is compiled into Java bytecode, which is then interpreted and executed by the Java Virtual Machines (JVMs). To achieve high performance, the codes (source code or bytecode) must be optimized for the existing Java virtual machines. In this paper, we evaluate the performance of loop processing in Kotlin and Java programs considering the existing JVM implementations. First, we perform micro-benchmarking of loop processing, such as for and while statements, using two popular JVM implementations. The results show that the performance depends on the description methods even for the same semantics. The performances can be classified into two groups: fast and slow, in both JVM implementations. Second, we compare the bytecodes generated by the compilers from the description methods of the fast and slow groups. We then show the differences between them, which are small and cannot be justified as the direct cause of a significant performance difference. Third, we compare the native codes generated by a just-in-time (JIT) compiler and show that the bytecode in the fast group is deeply optimized by the JIT compiler, while that in the slow group is not. In fact, small differences in the bytecode lead to differences in the behavior of the JIT compiler and to non-trivial performance gains. ------------------------------ This is a preprint of an article intended for publication Journal of Information Processing(JIP). This preprint should not be cited. This article should be cited as: Journal of Information Processing Vol.32(2024) (online) ------------------------------
収録刊行物
-
- 情報処理学会論文誌コンピューティングシステム(ACS)
-
情報処理学会論文誌コンピューティングシステム(ACS) 17 (1), 2024-03-26
情報処理学会
- Tweet
詳細情報 詳細情報について
-
- CRID
- 1050862623748102784
-
- NII書誌ID
- AA11833852
-
- ISSN
- 18827829
-
- 本文言語コード
- en
-
- 資料種別
- journal article
-
- データソース種別
-
- IRDB