es-toolkit/benchmarks/chunk.bench.ts

14 lines
334 B
TypeScript
Raw Normal View History

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