es-toolkit/benchmarks/performance/unzipWith.bench.ts
2024-07-17 11:47:39 +09:00

28 lines
566 B
TypeScript

import { unzipWith as unzipWithToolkit } from 'es-toolkit';
import { unzipWith as unzipWithLodash } from 'lodash';
import { bench, describe } from 'vitest';
describe('unzipWith', () => {
bench('es-toolkit/unzipWith', () => {
unzipWithToolkit(
[
[1000, 2000],
[3000, 4000],
[50000, 60000],
],
(a, b, c) => a + b + c
);
});
bench('lodash/unzipWith', () => {
unzipWithLodash(
[
[1000, 2000],
[3000, 4000],
[50000, 60000],
],
(a, b, c) => a + b + c
);
});
});