es-toolkit/benchmarks/performance/forEachRight.bench.ts
2024-08-22 23:16:01 +09:00

14 lines
415 B
TypeScript

import { bench, describe } from 'vitest';
import { forEachRight as forEachRightToolkit } from 'es-toolkit';
import { forEachRight as forEachRightLodash } from 'lodash';
describe('forEachRight', () => {
bench('es-toolkit/forEachRight', () => {
forEachRightToolkit([1, 2, 3, 4, 5, 6], x => x + 3);
});
bench('lodash/forEachRight', () => {
forEachRightLodash([1, 2, 3, 4, 5, 6], x => x + 3);
});
});