On Thu, Jun 20, 2013 at 6:20 PM, Stefan Sperling <stsp_at_elego.de> wrote:
> On Thu, Jun 20, 2013 at 08:13:14PM +0400, Ivan Zhakov wrote:
> > On Thu, Jun 20, 2013 at 8:02 PM, Mattias Engdegård
> > <mattiase_at_bredband.net> wrote:
> > > 20 jun 2013 kl. 16.54 skrev Ivan Zhakov:
> > >
> > >
> > >> It seems the code is missing #ifdef SVN_UNALIGNED_ACCESS_IS_OK . The
> > >> attached patch should fix problem, but I'm not sure that this is right
> > >> solution for the problem.
> > >
> > >
> > > Assuming the hash function does not need to be portable (which appears
> > > likely from a cursory look at the code), that fix is basically
> correct, if
> > > you move out the assignment i=0 to right before the section you made
> > > conditional. The following loop will complete the hash.
> > > In other words, something like:
> > >
> > Yes, I missed "i = 0" assignment. Thanks for fixing.
> >
> > Stefan, I think Mattias is faster and prefer this approach actually.
>
A capable compiler should unroll the inner loop
such that we end up with ~10 cycles / 4 bytes.
That would be slightly faster than the "* 33" loop.
Sure.
>
> I just committed my fix because it helps, but won't stand in the
> way of other fixes. I myself would let Stefan Fuhrmann make a final
> decision on this.
>
I had preferred the other patch for its simplicity.
However, I'm fine with the current one and voted
for its backport to 1.8.x. It gives us target-independent
cache behavior - which is a good thing.
-- Stefan^2.
Received on 2013-06-20 21:44:32 CEST