3 ms·
The 10% quoted was for x86-32 specifically, which does not have PC-relative addressing modes (x86-64 on the other hand does). In x86-32 PIC code compiled by GC
by caf 9y ago
The 10% quoted was for x86-32 specifically, which does not have PC-relative addressing modes (x86-64 on the other hand does). In x86-32 PIC code compiled by GCC for example you will see a lot of calls to __i686.get_pc_thunk.bx to obtain the PC value in a general purpose register which can then be used for address generation.
- olliej 9y agoI don't really consider 32bit builds to be something that you should be considering these days -- you should really be building x86-64 at this point. iOS is 64-bit only, macOS is warning devs about 32bit compiles, I refuse to believe that windows is still pushing 32bit. I can't imagine building linux 32bit at this point -- seriously, why would you throw away that perf?