[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFyw1n=Bz3vi73RD5R13HyWLaVyPZc_z5rR7nGPzvs-BOw@mail.gmail.com>
Date: Thu, 9 Feb 2012 09:08:05 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Howells <dhowells@...hat.com>, adobriyan@...il.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Reduce the number of expensive division instructions done
by _parse_integer()
On Thu, Feb 9, 2012 at 8:58 AM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> So David's patch looks ok, although if this really is
> performance-critical (and I could imagine some crazy /proc or /sys
> access loads where the divide really does show up very clearly) I do
> think it could be even done more efficiently. But probably only if we
> start doing some arch-specific stuff.
Looking at the code generated, the "val >> 60" thing actually does
generate a shift, and at least on x86-64, the attached patch generates
better code.
David, does this work for you? I also removed the nasty pointer
indirection crap.
Linus
View attachment "patch.diff" of type "text/x-patch" (1226 bytes)
Powered by blists - more mailing lists