Skip to content

Instantly share code, notes, and snippets.

View theScottyJam's full-sized avatar

Scotty Jamison theScottyJam

View GitHub Profile
@theScottyJam
theScottyJam / sortedUniqBenchmarks.js
Created February 18, 2023 17:39
sorted uniq benchmarks
const _ = require('lodash');
// Alter these values to see how it affects the overall performance.
const NUMBER_OF_UNIQUE_ITEMS = 100;
const NUMBER_OF_DUPLICATES_PER_ITEM = 10000;
const TRIALS = 100;
function buildArray() {
const result = [];
for (let i = 0; i < NUMBER_OF_UNIQUE_ITEMS; ++i) {