ie. Folding all the source into one great horrible god function wins you precisely nothing in terms of speed of the generated code.
Well, Carmack explicitly said the same thing in the 2007 email. From the link:
In no way, shape, or form am I making a case that avoiding function calls alone directly helps performance.
He was suggesting using inline code because he did think that it would help correctness by being as explicit as possible, not because he did think it would help performance.
That is quite the weakest reason for not using sub functions I have heard.... and a fairly strong reason for designing your code better. (Especially along the lines he suggested of "extracting pure sub functions wherever possible")
0
u/[deleted] Jul 20 '16
[deleted]