sudhanshu singh
05/10/2018, 10:36 AMUtils.Kt
object Utils {
fun doSomething(){
}
vs
Utils.Kt
fun doSomething(){
}
Andreas Sinz
05/10/2018, 10:40 AMdoSomething
Second one is a static function called doSomething
that is surrounded by a final classsudhanshu singh
05/10/2018, 10:46 AMkarelpeeters
05/10/2018, 10:49 AMkarelpeeters
05/10/2018, 10:49 AMAndreas Sinz
05/10/2018, 10:53 AMUtils
has to be created once, but that would be negligible if you call doSomething
a lot of times, so without any measurements I'd guess that they are similar in performanceAndreas Sinz
05/10/2018, 10:55 AM