pointless-map

Benchmark created by ZackBurtAWS on


Setup

let pointsArray_ = [];
  for(let i = 0; i<99999; i++) {
     pointsArray_.push(Math.random());
  }
  const pointsArray = new Float32Array(pointsArray_);

Test runner

Ready to run.

Testing in
TestOps/sec
For there is no point to this
const newPointsArray = [];
for(let i = 0; i < pointsArray.length; i++) {
   newPointsArray.push(pointsArray[i]);
}
ready
Pointless map
const newPointsArray = pointsArray.map(point => point);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by ZackBurtAWS on