Learning webgl_custom_attributes example

I am learning webgl_custom_attributes example. Here is the vertex-shader below:

uniform float amplitude;

attribute float displacement;

varying vec3 vNormal;
varying vec2 vUv;

void main() {

vNormal = normal;
vUv = ( 0.5 + amplitude ) * uv + vec2( amplitude );

vec3 newPosition = position + amplitude * normal * vec3( displacement );
gl_Position = projectionMatrix * modelViewMatrix * vec4( newPosition, 1.0 );

  }

I am wondering why the code comes liks this:

vec3 newPosition = position + amplitude * normal * vec3( displacement );

instead of below:

vec3 newPosition = position + displacement * amplitude * normal ;

I believe they are assigning the same value to newPosition.

Multiplying with vec3( displacement ) or just with displacement is identical. The vec3 is used for clarity reasons. Since multiplication is commutative, the order of the factors does not matter. Eventually, the same value is added to position for both statements.

Thanks. I thought that was for performance.