Are Java static calls more or less expensive than non-static calls?

前端 未结 12 2412
夕颜
夕颜 2020-11-27 11:57

Is there any performance benefit one way or another? Is it compiler/VM specific? I am using Hotspot.

12条回答
  •  无人及你
    2020-11-27 13:04

    There might be a difference, and it might go either way for any particular piece of code, and it might change with even a minor release of the JVM.

    This is most definitely part of the 97% of small efficiencies that you should forget about.

提交回复
热议问题