SIMD tuning with ASM pt. 1 - Stars & Constellations

ASM? You mean assembly language? I haven't looked at that since my senior project! How arcane! And compilers are so smart anymore, why should I care?

I used to feel the same way...albeit with a latent desire to learn it as I wish I knew Latin. Then one day I found myself out of options on my SIMD code generation project. The compilers were great, but making progress was like building a ship in the bottle. I was playing a game I know you've played too: "Let's Guess What the Compiler Will Do"!

I got tired of that game and bit the bullet. I did ASM dumps and tried to understand them. At first it appeared to me as a chaotic stars to someone who's never learned the constellations. As time went on though I found Orion! And Ursa Major too! Sideribus apparuit! That is, the patterns jumped out and became easy. Before I knew it, diving into ASM became part of my routine.

I want to share my know-how with you. Each post I'll give you a program and take apart the ASM that we care about using the Intel® C++ Compiler for Linux*. I guess I'll expect you to have a basic understanding of ASM, registers and the like...though I won't expect much. Stay tuned!

Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.