3 ms·
I'm no academic, but functional languages have performance problems that simply cannot be handwaved away. For example, say you have a function that modifies an
by SJC_Hacker 6y ago
I'm no academic, but functional languages have performance problems that simply cannot be handwaved away. For example, say you have a function that modifies an array. In a pure function, you cannot mutate in place, the function would need to return a "new" array. This necessitates at least a partial copy. I have seen proposed solutions for this where the array structure is some type of index table, where you can just mutate part of it and still maintain most of the original, thus avoiding having to potentially copy a huge amount of memory. However there is an unavoidable performance penalty, and also introduces issues like cache misses/pipeline stalls come in to play.