You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe it's not necessary to store all this stuff in closures, or some rarely used stuff can be moved to one "extra" field, the pointer to which would be just passed around most of the time.
The point is that at each function call you need to create a list with all these things. Hence, the length of this list has a significant impact on the overall running time.
In a purely functional programming language, function calls are the main way of transferring control ("loops" are implemented with function calls) and functions themselves are typically small. This means that the total number of operations performed is proportional (with a relatively small constant) to the number of function calls. Hence, any constant factor inefficiency in function call implementation translates to a comparable constant factor slowdown of the entire program. Function calls need to be as efficient as possible.
The text was updated successfully, but these errors were encountered:
I believe it's not necessary to store all this stuff in closures, or some rarely used stuff can be moved to one "extra" field, the pointer to which would be just passed around most of the time.
The point is that at each function call you need to create a list with all these things. Hence, the length of this list has a significant impact on the overall running time.
In a purely functional programming language, function calls are the main way of transferring control ("loops" are implemented with function calls) and functions themselves are typically small. This means that the total number of operations performed is proportional (with a relatively small constant) to the number of function calls. Hence, any constant factor inefficiency in function call implementation translates to a comparable constant factor slowdown of the entire program. Function calls need to be as efficient as possible.
The text was updated successfully, but these errors were encountered: