To think that manual for-loops are always faster than functional approach is a misconception. For instance in Rust using iterators and functions like map and filter are in fact as fast or even faster than manually implemented loops: doc.rust-lang.org/book/second-edit...
It's called zero-cost abstraction: you can write high level functional code and still get similar performance as manually implemented low level code.
I wouldn't be surprised if this is the case with other languages as well since modern compilers and interpreters are really good at optimizing.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
To think that manual for-loops are always faster than functional approach is a misconception. For instance in Rust using iterators and functions like map and filter are in fact as fast or even faster than manually implemented loops: doc.rust-lang.org/book/second-edit...
It's called zero-cost abstraction: you can write high level functional code and still get similar performance as manually implemented low level code.
I wouldn't be surprised if this is the case with other languages as well since modern compilers and interpreters are really good at optimizing.