This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33358] Slow calls through simple member function pointers
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Sep 2007 20:40:26 -0000
- Subject: [Bug c++/33358] Slow calls through simple member function pointers
- References: <bug-33358-15073@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2007-09-08 20:40 -------
VS seems to dispatch to some other function. Dependend on whether the method
is virtual or not the code path has to be more complicated. Of course this is
also dependent on the actual ABI. That is,
L7:
leal (%ebx,%edx), %edx
movl %edx, 8(%ebp)
popl %ebx
popl %ebp
jmp *%ecx
is the equivalent to the direct jump, and the rest involves loading the
vtable pointer.
leal (%ebx,%edx), %edx
movl (%edx), %eax
movl -1(%eax,%ecx), %ecx
movl %edx, 8(%ebp)
popl %ebx
popl %ebp
jmp *%ecx
and of course the check if this is a virtual method or not.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33358