Avoid multiply the array by a scalar once rather than twice. It makes the computation quite a bit faster.