groostav
04/03/2017, 6:29 AMasIterable()
extension function on your external class?Paul Woitaschek
04/03/2017, 9:25 AMgroostav
04/03/2017, 5:39 PMiterable
object gets allocated every time you write a for-each loop, and even with the most abusive kotlin code you can write I still suspect you wont hit the JVM as hard as a run-of-the-mill scala program. I think your committing an act of premature-optimization if your worried about an asIterable
extension method that allocates the few dozen bytes needed for an Iterable instance thrashing the GC.