Skip to content

Performance ​

es-toolkit/fp is designed with performance as a priority. Compared with other libraries such as remeda, we observed an average 1.5-3x performance improvement. This comes from using modern JavaScript APIs and focusing the implementation on the features that are necessary.

Performance Comparison ​

Test Environment
CPU:Apple M4 Max 16 core(s)
Memory:64.00 GB
Node.js:v22.18.0
Platform:Darwin arm64
es-toolkit/fpremedaFastest
pipe/map20,063 ops/sec6,849 ops/seces-toolkit/fp
pipe/filter + map12,305 ops/sec4,092 ops/seces-toolkit/fp
pipe/uniq16,295 ops/sec4,358 ops/seces-toolkit/fp

Measurement Method ​

The numbers above were measured on this branch with Vitest:

bash
yarn vitest bench performance/fp/pipe.bench.ts --run

See benchmarks/performance/fp/pipe.bench.ts for the exact benchmark code.

Released under the MIT License.