Comparative analysis of Kotlin coroutines with Java and Scala in parallel programming


The article presents a comparison of Kotlin coroutines with analogous solutions in Java and Scala in parallel programming using chosen metric and non-metric criteria. For that purpose, a multi-module project with corresponding implementations of selected algorithms in all of the three languages was created and then analyzed. The studies were preceded by a description of the created project.


kotlin; parallel programming; jvm; coroutines

Parallel Computing: Background,, [22.05.2020].

M. E. Conway, Design of a Separable Transition Diagram Compiler, Communications of the ACM 6.7 (1963) 396-408.

A. L. De Moura, R. Ierusalimschy, Revisiting Coroutines, ACM Transactions on Programming Languages and Systems 31.2 (2009) 1-31.

D. Racordon D, Coroutines with Higher Order Functions, arXiv preprint arXiv:1812.08278 (2018).

A. Ohlsson, E. Leffler E, A Coroutine Extension to Java, (2018).

D. E. Damasceno Costa, C. Bezemer, P. Leitner, A. Andrzejak, What's Wrong With My Benchmark Results? Studying Bad Practices in JMH Benchmarks, IEEE Transactions on Software Engineering (2019).

M. E. O'Neill, The Genuine Sieve of Eratosthenes, Journal of Functional Programming 19.1 (2009) 95-106.

Sieve of Eratostheneses animation,, [22.05.2020].

J. S. Greenfield, A Proof for a QuickHull Algorithm (1990).

Quickhull example, File:Quickhull_example3.svg, [22.05.2020].

Quickhull example, File:Quickhull_example6.svg, [22.05.2020]..

Quickhull example, File:Quickhull_example7.svg, [22.05.2020]

D. Nam, A. Horvath, A. Macvean, B. Myers, B. Vasilescu, MARBLE: Mining for Boilerplate Code to Identify API Usability Problems, 2019 34th IEEE/ACM International Conference on Automated Software Engineering (2019) 615-627.

Why are Scala for loops slower than logically identical while loops?,, [22.05.2020].

Micro-optimizing your Scala code,, [22.05.2020].


Published : 2020-09-30

Zieliński, A. (2020). Comparative analysis of Kotlin coroutines with Java and Scala in parallel programming. Journal of Computer Sciences Institute, 16, 241-246.

Adrian Zieliński