es-toolkit/benchmarks/differenceBy.bench.ts

14 lines
397 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', () => {
differenceByToolkit([1.2, 2.3, 3.4], [1.2], Math.floor);
});
2024-04-25 14:56:13 +03:00
bench('lodash', () => {
differenceByLodash([1.2, 2.3, 3.4], [1.2], Math.floor);
});
});