Two Reasons Functional Style Is Slow in SpiderMonkey Programming JS in a functional style is often more elegant but comes at the cost of performance. In the past, part of that performance problem has been due to native, C++ implementations of the most-often used higher-order operations like Array.prototype.forEach and friends. In a call like arr.forEach(f), the passed in kernel function f ends up