在Android Training的Best practices下的Performance中的Prefer static over virtual看到下面一句话:
If you don’t need to access an object’s fields, make your method static. Invocations will be about 15%-20% faster. It’s also good practice, because you can tell from the method signature that calling the method can’t alter the object’s state.(如果你不需要访问一个对象的值,请保证这个方法是static类型的,这样方法调用将快15%-20%。这是一个好的习惯,因为你可以从方法声明中得知调用无法改变这个对象的状态。)
那kotlin中不用静态方法, 是因为object为它起到了相同的性能改进作用么?