es-toolkit/benchmarks/sum.bench.ts

13 lines
281 B
TypeScript
Raw Normal View History

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