[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OFB722E663.C2FD29AD-ONC125766C.002805EE-C125766C.00289A56@transmode.se>
Date: Thu, 12 Nov 2009 08:23:29 +0100
From: Joakim Tjernlund <joakim.tjernlund@...nsmode.com>
To: roel kluin <roel.kluin@...il.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
Richard Purdie <rpurdie@...ys.net>
Subject: Re: [PATCH] zlib: Optimize inffast even more
roel kluin <roel.kluin@...il.com> wrote on 12/11/2009 00:46:41:
>
> On Mon, Nov 9, 2009 at 11:22 AM, Joakim Tjernlund
> <Joakim.Tjernlund@...nsmode.se> wrote:
> > This improves zlib: Optimize inffast when copying direct from output
> > and gives another 3-4% improvement for my MPC8321 target.
> > Does not need CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS,
> > uses get_unaligned() but only in one place.
> > The copy loop just above this one can also use this
> > optimization, but I havn't done so as I have not tested if it
> > is a win there too.
> >
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se>
> > ---
>
>
> > @@ -240,52 +243,49 @@ void inflate_fast(z_streamp strm, unsigned start)
> > }
> > else {
> > from = out - dist; /* copy direct from output */
> > -#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
> > /* minimum length is three */
> > if (dist > 2 ) {
> > - unsigned short *sout = (unsigned short *)(out - OFF);
> > - unsigned short *sfrom = (unsigned short *)(from - OFF);
> > - unsigned long loops = len >> 1;
> > + unsigned short *sout;
> > + unsigned short *sfrom;
> > + unsigned long loops;
> >
> > + /* Align out addr, only sfrom might be unaligned */
> > + if (!((long)(out - 1 + OFF)) & 1) {
>
> I think this is wrong
>
> did you mean
>
> if (!((long)(out - 1 + OFF) & 1))
Yes, will fix and send out a new patch with
cleanups and fixes for CPUs that cannot do unaligned
accesses. Thanks
Jocke
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists