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

14 lines
310 B
TypeScript
Raw Normal View History

2024-04-25 14:56:13 +03:00
import { bench, describe } from 'vitest';
import { round as roundToolkit } from 'es-toolkit';
import { round as roundLodash } from 'lodash';
describe('round', () => {
bench('es-toolkit/round', () => {
2024-04-25 14:56:13 +03:00
roundToolkit(1.2345, 2);
});
2024-04-25 14:56:13 +03:00
bench('lodash/round', () => {
2024-04-25 14:56:13 +03:00
roundLodash(1.2345, 2);
});
});