es-toolkit/benchmarks/performance/uniq.bench.ts

14 lines
331 B
TypeScript
Raw Normal View History

2024-04-25 14:56:13 +03:00
import { bench, describe } from 'vitest';
import { uniq as uniqToolkit } from 'es-toolkit';
import { uniq as uniqLodash } from 'lodash';
describe('uniq', () => {
bench('es-toolkit/uniq', () => {
2024-04-25 14:56:13 +03:00
uniqToolkit([11, 2, 3, 44, 11, 2, 3]);
});
2024-04-25 14:56:13 +03:00
bench('lodash/uniq', () => {
2024-04-25 14:56:13 +03:00
uniqLodash([11, 2, 3, 44, 11, 2, 3]);
});
});