Java optimizations: (Hotspot/Dalvik) Optimization of final method returning a constant?

后端 未结 3 541
野趣味
野趣味 2021-01-18 14:16

Can anyone tell me if either Hotspot or Dalvik is smart enough to inline calls to a final method returning a constant (static final) int value? Ideally the method call would

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-18 14:51

    Alternatively, Soot is expected to optimize Java bytecode for such case.

提交回复
热议问题