From: Willy Tarreau <w@1wt.eu>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "'Ammar Faizi'" <ammarfaizi2@gnuweeb.org>,
"Thomas Weißschuh" <linux@weissschuh.net>,
"Nicholas Rosenberg" <inori@vnlx.org>,
"Alviro Iskandar Setiawan" <alviro.iskandar@gnuweeb.org>,
"Michael William Jonathan" <moe@gnuweeb.org>,
"GNU/Weeb Mailing List" <gwml@vger.gnuweeb.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v3 0/4] nolibc x86-64 string functions
Date: Sun, 3 Sep 2023 23:19:42 +0200 [thread overview]
Message-ID: <20230903211942.GA31739@1wt.eu> (raw)
In-Reply-To: <e4862b01c0e4440f949e240360e438a3@AcuMS.aculab.com>
On Sun, Sep 03, 2023 at 08:38:22PM +0000, David Laight wrote:
> From: Ammar Faizi
> > Sent: 02 September 2023 14:35
> >
> > This is an RFC patchset v3 for nolibc x86-64 string functions.
> >
> > There are 4 patches in this series:
> >
> > ## Patch 1-2: Use `rep movsb`, `rep stosb` for:
> > - memcpy() and memmove()
> > - memset()
> > respectively. They can simplify the generated ASM code.
>
> It is worth pointing out that while the code size for 'rep xxxb'
> is smaller, the performance is terrible.
> The only time it is ever good is for the optimised forwards
> copies on cpu that support it.
>
> reverse, stos and scas are always horrid.
It's terrible compared to other approaches but not *that* bad. Also we
absolutely don't care about performance here, rather about correctness
and compact size.
Regards,
Willy
prev parent reply other threads:[~2023-09-03 21:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-02 13:35 [RFC PATCH v3 0/4] nolibc x86-64 string functions Ammar Faizi
2023-09-02 13:35 ` [RFC PATCH v3 1/4] tools/nolibc: x86-64: Use `rep movsb` for `memcpy()` and `memmove()` Ammar Faizi
2023-09-02 13:35 ` [RFC PATCH v3 2/4] tools/nolibc: x86-64: Use `rep stosb` for `memset()` Ammar Faizi
2023-09-02 19:28 ` Alviro Iskandar Setiawan
2023-09-02 19:34 ` Ammar Faizi
2023-09-03 8:17 ` Willy Tarreau
2023-09-03 8:39 ` Ammar Faizi
2023-09-03 9:55 ` Willy Tarreau
2023-09-02 13:35 ` [RFC PATCH v3 3/4] tools/nolibc: string: Remove the `_nolibc_memcpy_down()` function Ammar Faizi
2023-09-02 19:24 ` Alviro Iskandar Setiawan
2023-09-02 13:35 ` [RFC PATCH v3 4/4] tools/nolibc: string: Remove the `_nolibc_memcpy_up()` function Ammar Faizi
2023-09-02 19:26 ` Alviro Iskandar Setiawan
2023-09-03 20:38 ` [RFC PATCH v3 0/4] nolibc x86-64 string functions David Laight
2023-09-03 21:19 ` Willy Tarreau [this message]
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=20230903211942.GA31739@1wt.eu \
--to=w@1wt.eu \
--cc=David.Laight@ACULAB.COM \
--cc=alviro.iskandar@gnuweeb.org \
--cc=ammarfaizi2@gnuweeb.org \
--cc=gwml@vger.gnuweeb.org \
--cc=inori@vnlx.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=moe@gnuweeb.org \
/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