es-toolkit/benchmarks/intersection.bench.ts

13 lines
360 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]);
})
bench('lodash', () => {
intersectionLodash([1, 2, 3], [2, 4]);
})
});