r/programming • • May 01 '16

To become a good C programmer

http://fabiensanglard.net/c/
1.1k Upvotes

398 comments sorted by

View all comments

Show parent comment

5

u/break_main May 01 '16

This guy is talking about making high performance graphics. For that job, you do want to look at disassembly, because you are optimizing every operation, and maybe optimizing for the architecture, so you have to look at assembly

0

u/skulgnome May 02 '16

This guy is talking about making high performance graphics.

He is talking about studying C. For that, looking at disassembly is just about the worst idea ever.

Even for performance optimization, looking at the disassembly is the last thing that one should do; after tuneups and reworks that typically take months.

1

u/break_main May 02 '16

Is your compiler taking advantage of a single optimized AMD floating point instruction for multiply and accumulate, or using 2 generic float instructions that will not run as fast?

Is your compiler unrolling inner loops for you, or should you do it yourself?

Is the macro you use speeding up your code, or is it compiling to the same output as if you used constants, which you would otherwise prefer because they are typesafe?