https://github.com/BoscoDomingo/benchmarks/tree/main/JS-TS/for_vs_functional_programming
Underneath, it’s still for loops, so obviously any functionality added on top of those will be inherently slower than a for loop to begin with.
If you combine multiple, a for loop is done for each one of them, the operations cannot be combined! That’s basic functionality that a for loop does provide.
If you do a .map(), .filter(), etc, you can’t prematurely stop the execution, which you can do in a for loop
Each one of the functional programming methods creates a copy of the original array, which is a massive waste of memory.
Iteratorshttps://allthingssmitty.com/2026/01/12/stop-turning-everything-into-arrays-and-do-less-work-instead/
They allow for more efficient use of resources, premature returns, method combination…
forJust keep using for like in any other language and save yourself the pain of using FP in a language where they are a second-class citizen.