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

14 lines
325 B
TypeScript
Raw Normal View History

2024-04-25 14:56:13 +03:00
import { bench, describe } from 'vitest';
import { drop as dropToolkit } from 'es-toolkit';
import { drop as dropLodash } from 'lodash';
describe('drop', () => {
bench('es-toolkit/drop', () => {
2024-04-25 14:56:13 +03:00
dropToolkit([1, 2, 3, 4, 5, 6], 3);
});
2024-04-25 14:56:13 +03:00
bench('lodash/drop', () => {
2024-04-25 14:56:13 +03:00
dropLodash([1, 2, 3, 4, 5, 6], 3);
});
});