4 ms·
If you can cut things down to something reasonably self-contained, https://godbolt.org/ https://godbolt.org/ is incredibly useful. For example, I was curious ab
by slavik81 9y ago
If you can cut things down to something reasonably self-contained, https://godbolt.org/ https://godbolt.org/ is incredibly useful. For example, I was curious about the approximate inverse square root instruction, so I wrote some code: https://godbolt.org/g/qdfSj4 https://godbolt.org/g/qdfSj4
It's a lot easier to read that than the raw output from gcc. The highlighting between matching segments is nice, and the right-click menu has all sorts of goodies, like scrolling everything to the same place or showing the manual entry for some instruction. Plus, it's super easy to see the effect of switching flags or compilers.
Though to your point, apparently godbolt v0.0.1 was basically just:
watch "g++ /tmp/test.cc -O2 -c -S -o - -masm=intel | c++filit | grep -vE '\s+\.'"