public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "dengjianbo@loongson.cn" <dengjianbo@loongson.cn>
To: adhemerval.zanella <adhemerval.zanella@linaro.org>
Cc: joseph <joseph@codesourcery.com>,  carlos <carlos@redhat.com>,
	 libc-alpha <libc-alpha@sourceware.org>,
	 i.swmail <i.swmail@xen0n.name>,
	 xuchenghua <xuchenghua@loongson.cn>,
	 caiyinyu <caiyinyu@loongson.cn>
Subject: Re: [PATCH 0/2] LoongArch: Add optimized functions.
Date: Mon, 19 Sep 2022 10:03:17 +0800	[thread overview]
Message-ID: <2022091910031722091613@loongson.cn> (raw)
In-Reply-To: <403f78f0-55d9-48cf-c62a-4a0462a76987@loongson.cn>

[-- Attachment #1: Type: text/plain, Size: 2060 bytes --]

Hi Adhemerval,

Please kindly see the following link for the test results of comparing with 
new generic version. 
https://sourceware.org/pipermail/libc-alpha/2022-September/142016.html

Comparing with the previous patch, we further optimized strchr and
strchrnul, 4 instructions was reduced before the loop.

Best regards,
Deng jianbo
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Date: Fri, 2 Sep 2022 09:27:33 -0300
To: Joseph Myers <joseph@codesourcery.com>, Carlos O'Donell <carlos@redhat.com>
CC:caiyinyu <caiyinyu@loongson.cn>, libc-alpha@sourceware.org, i.swmail@xen0n.name, xuchenghua@loongson.cn
Subject: Re: [PATCH 0/2] LoongArch: Add optimized functions.

On 15/08/22 17:46, Joseph Myers wrote:
On Mon, 15 Aug 2022, Carlos O'Donell via Libc-alpha wrote:

On 8/15/22 04:57, caiyinyu wrote:
Tested on LoongArch machine: gcc 13.0.0, Linux kernel 5.19.0 rc2,
binutils branch master 2eb132bdfb9.

Could you please post microbenchmark results for these changes?

How much faster are they from the generic versions?

Note that so far we haven't merged the improved generic string functions that were posted a while back (https://sourceware.org/legacy-ml/libc-alpha/2018-01/msg00318.html is the version linked from https://sourceware.org/glibc/wiki/NewPorts - don't know if it's the most recent version). So even if assembly versions are better than the current generic string functions, they might not be better than improved generic versions with architecture-specific implementations of the headers to provide per-architecture tuning.


And it seems that some of this newer implementations does what my patch
basically does. The memmove is an improvement since the generic code we
have does a internal libcall to memcpy (which some architecture optimizes
it by implementing memcpy and memmove on some TU to just do a branch instead of a function call).

I will rebase and resend my improved generic string, I think it would
yield very similar numbers to the str* assembly implementations proposed.

  parent reply	other threads:[~2022-09-19  2:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15  8:57 caiyinyu
2022-08-15  8:57 ` [PATCH 1/2] LoongArch: Add optimized string functions: str{chr, chrnul, cmp, ncmp} caiyinyu
2022-08-15  8:57 ` [PATCH 2/2] LoongArch: Add optimized function: memmove caiyinyu
2022-08-15 14:02 ` [PATCH 0/2] LoongArch: Add optimized functions Carlos O'Donell
2022-08-15 20:46   ` Joseph Myers
     [not found]     ` <ccc3c93d-07d0-ea9b-562c-aeaec8914f20@loongson.cn>
2022-09-02  9:05       ` Fwd: " dengjianbo
2022-09-02 12:27     ` Adhemerval Zanella Netto
     [not found]       ` <403f78f0-55d9-48cf-c62a-4a0462a76987@loongson.cn>
2022-09-19  2:03         ` dengjianbo [this message]
2022-09-19 20:16           ` Adhemerval Zanella Netto
2022-09-20  9:54             ` Xi Ruoyao
2022-09-22 18:05               ` Adhemerval Zanella Netto
2022-09-26 13:49                 ` Xi Ruoyao
2022-09-28 14:22                   ` Richard Henderson
2022-09-28 16:42                     ` Xi Ruoyao
2022-09-28 19:18                       ` Richard Henderson
2022-10-10  1:39                         ` Lulu Cheng
2022-09-29  3:00                       ` Lulu Cheng
2022-09-29 11:45                   ` Adhemerval Zanella Netto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2022091910031722091613@loongson.cn \
    --to=dengjianbo@loongson.cn \
    --cc=adhemerval.zanella@linaro.org \
    --cc=caiyinyu@loongson.cn \
    --cc=carlos@redhat.com \
    --cc=i.swmail@xen0n.name \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=xuchenghua@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).