I took the Scala/Java sources from Robert Hundt’s Havlak benchmark and “ported” them to Kotlin. That benchmark was initially done to get an estimate how Google Go compares in performance to other languages like C/C++, Scala, Java, and others. See ws3-1-Hundt.pdf.https://days2011.scala-lang.org/sites/days2011/files/ws3-1-Hundt.pdf
The port to Kotlin is 99.5% finished. There is some bug somewhere as the Kotlin program completes much too quickly. When LoopTesterApp.main is run (vm args -server -Xss15500k must be provided to prevent stack overflow) it says:
# of loops: 1 (including 1 artificial root node) # of BBs : 252013
Which is wrong. It should be:
# of loops: 121002 (including 1 artificial root node) # of BBs : 252013
Now I’ve spent quite some time on this and the Groovy port (which is finished) and would like to spend my week-ends on something else. I’ve uploaded the Kotlin code to Github: https://github.com/oplohmann/havlak-jvm-languages. Anybody who feels like tracing down the bug and fixing it (and maybe improving the Kotlin code …) is cordially invited to join in. I want to write a report somewhen that includes the measurements for Xtend. Then all JVM languages that integrate well with Java are covered. Don’t worry, anybody who helped out in getting the Kotlin version to run will certainly receive some honorable mentioning once I will sit down to write that report ;-).