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 M3 Max 16 core(s)
Memory:64.00 GB
Node.js:v24.21.0
Platform:darwin arm64
es-toolkit/fpremedaFastest
pipe/map18,696 ops/sec6,708 ops/seces-toolkit/fp
pipe/filter + map10,948 ops/sec4,090 ops/seces-toolkit/fp
pipe/uniq14,031 ops/sec4,247 ops/seces-toolkit/fp

Measurement Method ​

Each benchmark runs in its own Node.js process with mitata, and the numbers above are the median of five runs. To run the benchmark yourself:

bash
yarn bench fp/pipe

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

Released under the MIT License.