[Issue 9816] Export is mostly broken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 30 08:16:12 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9816



--- Comment #30 from Martin Nowak <code at dawg.eu> 2013-08-30 08:16:09 PDT ---
(In reply to comment #29)
> The only question remaining is, how big the performance impact is when doing
> cross DLL calls. When the compiler knows that the function is located inside a
> DLL it can directly generate a jmp. If it doesn't know it, it has to call the
> function stub which itself does the jmp. That means using this aliasing all
> cross DLL function call would have a additional call instruction overhead. If
> you use a object oriented API this overhead should be minimal because most
> function calls go through vtables anyway. But how big is it for functional
> libraries, like phobos?

The situation is much worse on linux because ALL symbols are exported by
default and interposition forces indirection through PLT or GOT even within the
same shared library.
IIRC Andrei operated with a number of 5-10% performance penalty for such PIC
code.
If we can shift to only make exported symbols visible we might reduce that
penalty significantly and be on par with the Windows, so it's a likely a few
percent.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list