Node.js Measure the Performance of a Piece of Code

From WikiMLT

Node.js Per­for­mane

function removeDupesFromArray(arr = []) {
  return [...new Set(arr)];
}
const start = performance.now();
removeDupesFromArray(arr);
const end = performance.now();
console.log(`${end - start} ms`);
0.35230207443237305 ms