unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Sunil Pandey <skpgkp2@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: abush wang <abushwangs@gmail.com>,
	Noah Goldstein <goldstein.w.n@gmail.com>,
	abushwang via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: x86-64: strlen-evex performance performance degradation compared to strlen-avx2
Date: Mon, 29 Apr 2024 10:41:40 -0700	[thread overview]
Message-ID: <CAMAf5_e=9XuRnz-VALdFO-0Nie38fgAXRLwAZNVmnn9NFfEVog@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOrA87o1eT7L1WeKR_KD5_w=VxEr1MseprgAuO5s6VdXEg@mail.gmail.com>

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

On Sun, Apr 28, 2024 at 9:17 AM H.J. Lu <hjl.tools@gmail.com> wrote:

> On Sun, Apr 28, 2024 at 9:13 AM Sunil Pandey <skpgkp2@gmail.com> wrote:
> >
> >
> >
> > On Sat, Apr 27, 2024 at 7:13 PM abush wang <abushwangs@gmail.com> wrote:
> >>
> >> Actually, I was handling performance issue from  libmicro in our distro
> OS.
> >> I found that the performance degradation of localtime_r benchmark from
> libmicro is blame to strlen.
> >> So I abstracted this test case.
> >>
> >
> > Can you consistently reproduce strlen perf behaviour by running multiple
> times back-to-back?
> >
> > You can see high swing from run
>
> Hi Sunil,
>
> Intel(R) Xeon(R) Gold 6133 CPU @ 2.50GHz is SKX.  Please add this test to
> benchtests/bench-strlen.c and check its performance on SKX.
>
> --
> H.J.
>

I collected the glibc micro-benchmark data for the string length in
question.

2.38 evex data:

length=4, alignment=4:         4.40
length=4, alignment=0:         4.29
length=4, alignment=0:         3.64
length=4, alignment=7:         3.64
length=4, alignment=2:         3.64

2.28 evex data:

Length    4, alignment  4: 6.46875
Length    4, alignment  0: 6.5
Length    4, alignment  0: 6.53125
Length    4, alignment  7: 6.46875
Length    4, alignment  2: 6.53125

Data collected on Machine: Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz

2.38 perf numbers are better than 2.28 as expected.

--Sunil

[-- Attachment #2: Type: text/html, Size: 7032 bytes --]

  reply	other threads:[~2024-04-29 17:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26  4:03 x86-64: strlen-evex performance performance degradation compared to strlen-avx2 abush wang
2024-04-26 13:30 ` H.J. Lu
2024-04-26 16:53   ` Sunil Pandey
2024-04-28  2:13     ` abush wang
2024-04-28 16:12       ` Sunil Pandey
2024-04-28 16:16         ` H.J. Lu
2024-04-29 17:41           ` Sunil Pandey [this message]
2024-04-29 20:19             ` H.J. Lu
2024-04-30  0:54               ` Sunil Pandey
2024-04-30  2:51                 ` H.J. Lu
2024-04-30 20:16                   ` Sunil Pandey
2024-04-28  2:06   ` abush wang

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to='CAMAf5_e=9XuRnz-VALdFO-0Nie38fgAXRLwAZNVmnn9NFfEVog@mail.gmail.com' \
    --to=skpgkp2@gmail.com \
    --cc=abushwangs@gmail.com \
    --cc=goldstein.w.n@gmail.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).