[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <80b4bbe8-2394-cfbb-ace1-9402169f5131@suse.com>
Date: Thu, 22 Jul 2021 11:28:56 +0300
From: Nikolay Borisov <nborisov@...e.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Dave Chinner <david@...morbit.com>
Subject: Re: [PATCH] lib/string: Bring optimized memcmp from glibc
On 21.07.21 г. 21:45, Linus Torvalds wrote:
> On Wed, Jul 21, 2021 at 11:17 AM Nikolay Borisov <nborisov@...e.com> wrote:
>>
>> I find it somewhat arbitrary that we choose to align the 2nd pointer and
>> not the first.
>
> Yeah, that's a bit odd, but I don't think it matters.
>
> The hope is obviously that they are mutually aligned, and in that case
> it doesn't matter which one you aim to align.
>
>> So you are saying that the current memcmp could indeed use improvement
>> but you don't want it to be based on the glibc's code due to the ugly
>> misalignment handling?
>
> Yeah. I suspect that this (very simple) patch gives you the same
> performance improvement that the glibc code does.
You suspect correctly, perf profile:
30.44% -29.38% [kernel.vmlinux] [k] memcmp
This is only on x86-64 as I don't have other arch handy. But this one is
definitely good.
Powered by blists - more mailing lists