This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] libdw: pre-compute leb128 loop limits
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 15 Dec 2014 22:42:45 +0100
- Subject: Re: [PATCH] libdw: pre-compute leb128 loop limits
On Mon, 2014-12-15 at 12:18 -0800, Josh Stone wrote:
> On Fedora 21, this appears to be slightly faster, although pretty close
> to noise levels. Mark, can you see if this helps the performance slip
> on your el7 system?
It is slightly faster ~0.5 secs on ~55 secs.
> /* Unrolling 0 like uleb128 didn't prove to benefit optimization. */
> - for (unsigned int i = 0; i < len_leb128 (acc) && *addrp < end; ++i)
> + const size_t max = __libdw_max_len_leb128 (*addrp, end);
> + for (size_t i = 0; i < max; ++i)
> get_sleb128_step (acc, *addrp, i);
> /* Other implementations set VALUE to INT_MAX in this
> case. So we better do this as well. */
Unrolling this does seem to give an addition ~0.2 seconds win.
So both are mostly in the noise, but they do seem to help a little.
But not as much as upgrading GCC :)