
On Mon, Apr 4, 2011 at 10:14 PM, Jeffrey Lee Hellrung, Jr. < jeffrey.hellrung@gmail.com> wrote:
On Mon, Apr 4, 2011 at 3:33 PM, Dave Abrahams <dave@boostpro.com> wrote:
I've found that when everything is inlined and flow analysis allows the compiler to "see" the source of function pointers/references, many compilers can turn an indirect call into a direct one.
Perhaps GCC will do better. I'll try to generate the assembly output in that case...
It looks to me like GCC likewise does not inline the indirection, based on a study of the output of passing -fdump-tree-all (found this option from a stackoverflow question). The assembly output I was able to generate with g++ was basically incomprehensible to me, but I didn't spend very much time on it and I'm sure there's a way to make it at least as readable as MSVC's assembly output, if anyone wants to try (see previous email for attached cpp file). - Jeff