title: Nodejs GPU.js slower using GPU than using CPU
body: <p>I have run a benchmark to compare the use of CPU and GPU in nodejs with GPU.js. The NVidia icon shows GPU use in the first console timer, but it is slower than the CPU (second timer).</p>
  <pre><code>const {GPU} = require('gpu.js');
  const gpu = new GPU();
  
  const multiplyMatrix = gpu.createKernel(function(a, b) {
      let sum = 0;
      for (let i = 0; i &lt; 512; i++) {
          sum += a[this.thread.y][i] * b[i][this.thread.x];
      }
      return sum;
  }).setOutput([512, 512]);
  
  var a = [];
  var b = [];
  for (var i = 0; i &lt; 512; i++) {
      a.push([]);
      b.push([]);
      for (var j = 0; j &lt; 512; j++) {
          a[i].push(1);
          b[i].push(-1);
      }
  }
  
  console.time(&quot;gpu&quot;);
  const c = multiplyMatrix(a, b);
  console.timeEnd(&quot;gpu&quot;); //2148ms
  
  console.time(&quot;cpu&quot;);
  var d = [];
  for (var i = 0; i &lt; 512; i++) {
      d.push([]);
      for (var j = 0; j &lt; 512; j++) {
          let sum = 0;
          for (let k = 0; k &lt; 512; k++) {
              sum += a[i][k] * b[k][j];
          }
          
          d[i].push(sum);
      }
  }
  console.timeEnd(&quot;cpu&quot;); //710ms
  </code></pre>
  <p>Am I doing something clearly wrong?</p>