From: Rich Felker <dalias@libc.org>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: musl <musl@lists.openwall.com>
Subject: Re: [PATCH 1/2] x86_64/memset: simple optimizations
Date: Tue, 10 Feb 2015 20:21:26 -0500 [thread overview]
Message-ID: <20150211012126.GQ23507@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAK1hOcM+0OHph8Misqrgt_QspoPox8ybqrEmsCDUiEn76CCORQ@mail.gmail.com>
On Wed, Feb 11, 2015 at 02:07:23AM +0100, Denys Vlasenko wrote:
> On Tue, Feb 10, 2015 at 10:37 PM, Rich Felker <dalias@libc.org> wrote:
> > OK. Based on some casual testing on my Celeron 847:
> >
> > - For small sizes, your patches make significant improvement, 20-30%.
> >
> > - For rep stosq path, the improvement is minimal (roughly 1-2 cycles).
> >
> > - Using 32-bit imul instead of 64-bit makes no difference at all.
>
> That's because Celeron 847 is a Sandy Bridge CPU. Only Intel's "big"
> CPUs starting from Nehalem have fast (and large in transistor count)
> integer multiplier capable of 3-cycle 64-bit multiply.
>
> Many other CPUs are worse, even Intel ones: Atoms are 13-cycle (!),
> Silvermont: 5 cycles. AMD's Bulldozers: 6 cycles, Bobcat: 6-7, Jaguar:
> 6, K10: 4 cycles.
>
> 32-bit imul is 3 or 4 cycles on all these CPUs (well, Atom has 5).
Thanks for the info, and for the patches, which I just committed.
Rich
prev parent reply other threads:[~2015-02-11 1:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-10 17:30 Denys Vlasenko
2015-02-10 17:30 ` [PATCH 2/2] x86_64/memset: avoid prforming final store twice Denys Vlasenko
2015-02-10 20:50 ` [PATCH 1/2] x86_64/memset: simple optimizations Rich Felker
2015-02-10 21:08 ` Denys Vlasenko
2015-02-10 21:37 ` Rich Felker
2015-02-10 22:36 ` Rich Felker
2015-02-10 23:20 ` Rich Felker
2015-02-11 1:07 ` Denys Vlasenko
2015-02-11 1:21 ` Rich Felker [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=20150211012126.GQ23507@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
--cc=vda.linux@googlemail.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).