RunKit + npm: uniq

node v10.16.0
version: master
endpointsharetweet
const uniq = require("uniq") const arr1 = Array.from(Buffer.allocUnsafe(1e4)); const arr2 = arr1.slice(); console.time('uniq') for(let i = 0; i < 1e4; ++i) { uniq(arr1); } console.timeEnd('uniq') console.time('set') for(let i = 0; i < 1e4; ++i) { const arr3 = [...new Set(arr2)] } console.timeEnd('set')
Created from: https://npm.runkit.com/uniq
Loading…

no comments

    sign in to comment