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

14 lines
423 B
TypeScript
Raw Normal View History

2024-04-25 14:56:13 +03:00
import { bench, describe } from 'vitest';
import { differenceBy as differenceByToolkit } from 'es-toolkit';
import { differenceBy as differenceByLodash } from 'lodash';
describe('differenceBy', () => {
bench('es-toolkit/differenceBy', () => {
2024-04-25 14:56:13 +03:00
differenceByToolkit([1.2, 2.3, 3.4], [1.2], Math.floor);
});
2024-04-25 14:56:13 +03:00
bench('lodash/differenceBy', () => {
2024-04-25 14:56:13 +03:00
differenceByLodash([1.2, 2.3, 3.4], [1.2], Math.floor);
});
});