2 ms·
The coolest part of this for me is that compilers can optimize this stuff out and replace it with the machine instructions. I know that optimizing compilers do
by winrid 7y ago
The coolest part of this for me is that compilers can optimize this stuff out and replace it with the machine instructions.
I know that optimizing compilers do some amazing things, but detecting this particular case is pretty cool.
- snailmailman 7y agoI highly recommend Matt Godbolt's talk "What has my compiler done for me lately?"[0] and its follow-up[1]. Both are great presentations going into details on some of the crazy optimizations compilers will do. As someone who knows very little about the inner workings of compilers my mind was blown when I saw some them. [0] https://www.youtube.com/watch?v=bSkpMdDe4g4 https://www.youtube.com/watch?v=bSkpMdDe4g4 [1] https://www.youtube.com/watch?v=nAbCKa0FzjQ https://www.youtube.com/watch?v=nAbCKa0FzjQ
- winrid 7y agoFantastic. Adding to my watch list.