I have read many question about improving the performance of C++ and C code . Almost all the answer people have end up with observing assembly code generated by the compiler.
If I want to understand this technique, what are the best resource for that?
Practice is your best teacher
Write a simple test file:
then
gcc -S test.cppwill give you the generated assembly code intest.s. Add-Oxif you want.If you have difficulties understanding the assembly language, you’d better start from
GNU assembly languageandlinkers & loaders, and alsoIntel® 64 and IA-32 Architectures Software Developer’s Manual. It is a great reference book.