[PATCH] D19995: Optimize access to global variable references in PIE mode when linker supports copy relocations for PIE

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Sun May 8 09:41:07 PDT 2016


On Sun, May 08, 2016 at 09:08:48AM -0700, H.J. Lu wrote:
> Some Linux distros have disabled lazy binding.  I didn't notice any
> significant startup time impact.  In fact, I only
> discovered that lazy binding was disabled by accident on my desktop
> machine.

The impact is easily measurable, consider a simple shell loop like:
  for x in $(seq 1 1000); do /bin/echo -n; done

On my build server, that takes 0.53s. Setting LD_BIND_NOW, it takes
0.70s. There are work loads for which this easily translates into a
significant chunk of the total run time.

Joerg


More information about the llvm-commits mailing list