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

14 lines
313 B
TypeScript
Raw Normal View History

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