I just read https://techfindings.one/archives/2652 about functional programming and came accross this:
anonymous functions can often not be JIT compiled and will never be optimized
Can someone explain to me why this is the case?
I just read https://techfindings.one/archives/2652 about functional programming and came accross this:
anonymous functions can often not be JIT compiled and will never be optimized
Can someone explain to me why this is the case?
There is a common misconception about nested functions, named or anonymous, where people think that because the function is declared inside another function, that the compiler must recompile it every time the outer function is invoked. This isn't true. The function's code is constant, even if its calling context isn't, and it can be inlined or optimized just like any other function. This confusion seems especially potent among programmers who primarily use nested functions in interpreted/JIT language implementations, like in this question.
That article has a few other similar misconceptions that show he doesn't understand the issues as well as he thinks he does. I would not consider it a trustworthy source for learning about functional programming.