mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: musl <musl@lists.openwall.com>
Subject: Re: [PATCH 1/2] x86_64/memset: avoid multiply insn if possible
Date: Fri, 13 Feb 2015 17:38:45 +0100	[thread overview]
Message-ID: <CAK1hOcP8D2pbFMrcFWPrbiHXeB5_NBUwJ20Bf75fx1ETNp4ptA@mail.gmail.com> (raw)
In-Reply-To: <20150213072436.GD23507@brightrain.aerifal.cx>

On Fri, Feb 13, 2015 at 8:24 AM, Rich Felker <dalias@libc.org> wrote:
> On Thu, Feb 12, 2015 at 09:36:26PM +0100, Denys Vlasenko wrote:
> In practice it performs quite well. x86's are good at this. The
> generic C code in memset.c does not do any overlapping writes of
> different sizes for the short buffer code path -- all writes there are
> single-byte, and multiple-write only happens for some of the inner
> bytes depending on the value of n.

Measurements agree: I was not able to make it faster by doing it
differently.
I did find it possible to extend your trick to be usable for up to 30
byte blocks.
Sending the patch...


      reply	other threads:[~2015-02-13 16:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 17:17 Denys Vlasenko
2015-02-12 17:17 ` [PATCH 2/2] x86_64/memset: align destination to 8 byte boundary Denys Vlasenko
2015-02-12 17:27 ` [PATCH 1/2] x86_64/memset: avoid multiply insn if possible Rich Felker
2015-02-12 19:26   ` Denys Vlasenko
2015-02-12 20:36     ` Denys Vlasenko
2015-02-13  7:24       ` Rich Felker
2015-02-13 16:38         ` Denys Vlasenko [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=CAK1hOcP8D2pbFMrcFWPrbiHXeB5_NBUwJ20Bf75fx1ETNp4ptA@mail.gmail.com \
    --to=vda.linux@googlemail.com \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).