of constructor vs array assignment

Edit on GitHub

Setup

Tests

  • of constructor

    const x = Float32Array.of(1, 2, 3);
  • array assignment

    const x = new Float32Array(3);
    x[0] = 1;
    x[1] = 2;
    x[2] = 3;