public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: dengjianbo <dengjianbo@loongson.cn>, libc-alpha@sourceware.org
Cc: adhemerval.zanella@linaro.org, caiyinyu@loongson.cn,
	xuchenghua@loongson.cn,  huangpei@loongson.cn
Subject: Re: [PATCH 1/4] LoongArch: Add ifunc support for strcpy{aligned, unaligned, lsx, lasx}
Date: Fri, 08 Sep 2023 22:22:23 +0800	[thread overview]
Message-ID: <7246aa6f75703fd18f9a22e83d759dae1264797b.camel@xry111.site> (raw)
In-Reply-To: <20230908093357.3119822-2-dengjianbo@loongson.cn>

On Fri, 2023-09-08 at 17:33 +0800, dengjianbo wrote:
> According to glibc strcpy microbenchmark test results(changed to use
> generic_strcpy instead of strlen + memcpy), comparing with generic_strcpy,
> this implementation could reduce the runtime as following:
> 
> Name              Percent of rutime reduced
> strcpy-aligned    10%-45%
> strcpy-unaligned  10%-49%, comparing with the aligned version,unaligned
>                   version experience better performance in case src and dest
>                   cannot be both aligned with 8bytes
> strcpy-lsx        20%-80%
> strcpy-lasx       15%-86%

Generic strcpy calls stpcpy, so if we've optimized stpcpy maybe it's not
necessary to duplicate everything in strcpy.  Is there a benchmark
result comparing the timing with and without this patch, but both with
the second patch (optimized stpcpy)?

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2023-09-08 14:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08  9:33 [PATCH 0/4] LoongArch: Add ifunc support for str{cpy, rchr}, dengjianbo
2023-09-08  9:33 ` [PATCH 1/4] LoongArch: Add ifunc support for strcpy{aligned, unaligned, lsx, lasx} dengjianbo
2023-09-08 14:22   ` Xi Ruoyao [this message]
2023-09-11  9:53     ` dengjianbo
2023-09-13  7:47       ` dengjianbo
2023-09-08  9:33 ` [PATCH 2/4] LoongArch: Add ifunc support for stpcpy{aligned, " dengjianbo
2023-09-08  9:33 ` [PATCH 3/4] LoongArch: Add ifunc support for strrchr{aligned, " dengjianbo
2023-09-08  9:33 ` [PATCH 4/4] LoongArch: Change to put magic number to .rodata section dengjianbo

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=7246aa6f75703fd18f9a22e83d759dae1264797b.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=adhemerval.zanella@linaro.org \
    --cc=caiyinyu@loongson.cn \
    --cc=dengjianbo@loongson.cn \
    --cc=huangpei@loongson.cn \
    --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).