Subject: Re: Performance impact of -no-pie

From: Alex <[email-masked]>
Date: Mon, 17 Oct 2016 22:06:11 -0600

Paul Eggert <[email-masked]> writes:

>> Is such a performance impact expected? If so, is there a plan to regain the
> old speed?
>
> No, such a performance change is not expected.
>
> Can you reproduce the problem with the emacs-25 or master branches, without
> manually adding -no-pie to CFLAGS? The bleeding-edge versions of Emacs attack
> the problem in a slightly different way, which might affect performance less.
>
> If you still see a performance problem, can you narrow it down, e.g., by
> configuring it with --enable-profiling and seeing where the extra cycles are
> going?

Ah, I see. It looks like the bleeding-edge versions add -no-pie to
LDFLAGS instead of CFLAGS. Doing the same thing myself both to those
versions and the 25.1 tarball (which is what I was using before) now
results in the same performance as before, within error.

Is it a bug that adding -no-pie to CFLAGS slows startup and runtime
performance by a factor of 2?

I would have expected that -no-pie would generally be faster compared to
-pie. Is that not the case?

Thanks.