4 ms·
Putting the whole algorithm in a single function isn't for the compiler's benefit but for the reader's. Especially in languages with side effects any function c
by josephlord 12y ago
Putting the whole algorithm in a single function isn't for the compiler's benefit but for the reader's. Especially in languages with side effects any function call you need to analyse takes time and then you need to come back to the main function and remember your mental state.
Please note that in many cases putting an algorithm in a single function is the wrong choice but there is also a cost in splitting it.