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

14 lines
307 B
TypeScript
Raw Normal View History

2024-07-08 09:30:40 +03:00
import { bench, describe } from 'vitest';
import { head as headToolkit } from 'es-toolkit';
import { head as headLodash } from 'lodash';
describe('head', () => {
bench('es-toolkit/head', () => {
headToolkit([1, 2, 3, 4]);
});
bench('lodash/head', () => {
headLodash([1, 2, 3, 4]);
});
});