3 ms·
I know I'm probably being too conservative from my years doing embedded and assembly programming, but I disagree with this. As you know, there is a cost to add
by cryptnoob 17y ago
I know I'm probably being too conservative from my years doing embedded and assembly programming, but I disagree with this.
As you know, there is a cost to adding functions. They are not free from a code performance standpoint. Are they so close to being free that you don't need to worry? That depends on the processor and the application. I still do embedded and assembly programming, so I can't afford to drop this habit, because there, it does matter. So for web apps, I continue to use them liberally, but definitely not "at the drop of a hat".
- gjm11 17y agoWith a Sufficiently Smart Compiler (tm), there is no cost to adding functions because the compiler can inline them. FWIW, on the simple example I just tried "gcc -O3" is a sufficiently smart compiler.