2 ms·
The interesting part is that no, function calls do not all use an entire stack frame, unless you compile your code for debugging. Compilers are smart enough to
by marcosdumay 4y ago
The interesting part is that no, function calls do not all use an entire stack frame, unless you compile your code for debugging. Compilers are smart enough to reencode the calling into just registry shifting, or even inline the entire thing.
- 082349872349872 4y agoAgreed, compilers do now. In 1978, they did not. (although maybe even then things like BLISS, on minis, did?) The machine I learned C with maxed out at 64K data. Needless to say, the compiler was not doing much beyond peephole optimization.
- marcosdumay 4y agoWell, the developer saying that some times had a real point in 1978. A lot of developers migrated, some didn't, often for very good reasons. The 99% of the developers being ok with C only happened after optimizing compilers was a thing. Of course, none of that means that the entire endeavor was worthless before that. It just means that whatever improvement you create, it won't appease to a lot of developers, and it's ok. One can only get unanimity if the change has no drawbacks at all, under no context.