在Android Training的Best practices下的Performance中的Performance Tips看到下面一句话:
An array of ints is a much better than an array of Integer objects
(一组int数据要比一组Integer对象要好很多)
- 这让我想起在哪看到的, 说不要让基本数据类型与包装数据类型频繁开装箱, 这样会耗性能.
- kotlin中什么一个数据类型, 一种类型只有一个关键字, 比如java声明"整型", 有int和Integer, kotlin中就只有Int