es-toolkit/benchmarks/intersection.bench.ts

14 lines
363 B
TypeScript
Raw Normal View History

2024-04-25 14:56:13 +03:00
import { bench, describe } from 'vitest';
import { intersection as intersectionToolkit } from 'es-toolkit';
import { intersection as intersectionLodash } from 'lodash';
describe('intersection', () => {
bench('es-toolkit', () => {
intersectionToolkit([1, 2, 3], [2, 4]);
});
2024-04-25 14:56:13 +03:00
bench('lodash', () => {
intersectionLodash([1, 2, 3], [2, 4]);
});
});