diff --git a/benchmarks/performance/reverse.bench.ts b/benchmarks/performance/reverse.bench.ts index 944bf9c6c..0838d1317 100644 --- a/benchmarks/performance/reverse.bench.ts +++ b/benchmarks/performance/reverse.bench.ts @@ -2,16 +2,19 @@ import { bench, describe } from 'vitest'; import { reverse as reverseCompat_ } from 'es-toolkit/compat'; import { reverse as reverseLodash_ } from 'lodash'; +const reverseCompat = reverseCompat_; +const reverseLodash = reverseLodash_; + const testArray = Array.from({ length: 1000 }, (_, i) => i); describe('Reverse function performance tests', () => { bench('es-toolkit compat reverse', () => { const arrayCopy = [...testArray]; - reverseCompat_(arrayCopy); + reverseCompat(arrayCopy); }); bench('lodash reverse', () => { const arrayCopy = [...testArray]; - reverseLodash_(arrayCopy); + reverseLodash(arrayCopy); }); });