Performance of variable argument methods in Java

前端 未结 6 1183
小鲜肉
小鲜肉 2020-12-19 20:42

I have this question about the performance of a method in Java with a variable number of parameters.

Say I have the following 2 alternatives:

public          


        
6条回答
  •  盖世英雄少女心
    2020-12-19 20:48

    Heard about the two optimisation rules:

    • Don't optimize
    • (For experts only!) Don't optimize yet

    In other words this is nothing you should care about from the performance point of view.

提交回复
热议问题