groostav04/03/2017, 6:29 AM
extension function on your external class?
Paul Woitaschek04/03/2017, 9:25 AM
groostav04/03/2017, 5:39 PM
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
extension method that allocates the few dozen bytes needed for an Iterable instance thrashing the GC.