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

28 lines
566 B
TypeScript
Raw Normal View History

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
);
});
});