Is a new float array allocated for every loop run for the code below?
for (Element e : elements) e.colorize( new float[] { 0.5f, 0.5f, 0.5f, 0.5f } );
Is there a performance gain in changing it into the following?
float[] color = new float[] { 0.5f, 0.5f, 0.5f, 0.5f };
for (Element e : elements) e.colorize(color);