hym1224 / java

0 stars 0 forks source link

inline method #8

Open hym1224 opened 6 years ago

hym1224 commented 6 years ago

from http://blog.csdn.net/swt_zql/article/details/9159593

1:使用final 修饰方法 2: private 也可能是内联函数

调用处直接展开使用,从而提高程序执行速度, 当被指定为内联的方法体很大时,展开的开销可能就已经超过了普通函数调用调用的时间,引入了内联反而降低了性能