es-toolkit/benchmarks/performance/difference.bench.ts
2024-07-17 11:47:39 +09:00

14 lines
365 B
TypeScript

import { bench, describe } from 'vitest';
import { difference as differenceToolkit } from 'es-toolkit';
import { difference as differenceLodash } from 'lodash';
describe('difference', () => {
bench('es-toolkit/difference', () => {
differenceToolkit([1, 2, 3], [2]);
});
bench('lodash/difference', () => {
differenceLodash([1, 2, 3], [2]);
});
});