public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "謝昇達(Shen-Ta Hsieh)" <ibmibmibm.tw@gmail.com>
To: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v6 2/3] x86_64: roundeven with sse4.1 support
Date: Sun, 23 May 2021 08:41:50 +0800	[thread overview]
Message-ID: <CA+fY3Ldipj7UR_FD6pvd8E+2A=sQmdLTiYrk0gPc6P861SddZg@mail.gmail.com> (raw)
In-Reply-To: <mwbl93mku6.fsf@tomate.loria.fr>

Dear Paul,

Paul Zimmermann <Paul.Zimmermann@inria.fr> 於 2021年5月22日 週六 下午12:52寫道:
>
>        Dear Shen-Ta,
>
> > Here is a benchmark result on my AMD Ryzen 9 3900X system:
> >
> > * benchmark result before this commit
> > |            |    roundeven |   roundevenf |
> > |------------|--------------|--------------|
> > | duration   |  3.77659e+09 |  3.77504e+09 |
> > | iterations |  3.97043e+08 |  4.36752e+08 |
> > | max        | 83.714       | 58.861       |
> > | min        |  7.144       |  6.27        |
> > | mean       |  9.51179     |  8.64345     |
> >
> > * benchmark result after this commit
> > |            |    roundeven |   roundevenf |
> > |------------|--------------|--------------|
> > | duration   |  3.76913e+09 |  3.76923e+09 |
> > | iterations |  5.55921e+08 |  5.64822e+08 |
> > | max        | 211.698      | 439.09       |
> > | min        |  6.498       |  6.422       |
> > | mean       |  6.77998     |  6.6733      |
>
> I wonder why the max times have increased by a factor 2.5 and 7.5.
> In my experiments I noticed that the "mean" time was quite stable,
> while the "max" time could vary a lot between different runs. Thus
> I usually run 5 times "make bench" and keep the smallest times:
>
> $ ./testrun.sh benchtests/bench-roundeven
>
> You can also try make USE_RDTSCP=1 bench (cf benchtests/README).
>
> And it would be nice to have figures on another hardware (for example Intel).
>
> Best regards,
> Paul Zimmermann
>

I've tried to run another benchmark following your advises, and here
is the result:

# AMD Ryzen 9 3900X 12-Core Processor

* benchmark result before this commit
|            |    roundeven |   roundevenf |
|------------|--------------|--------------|
| duration   |  3.75587e+09 |  3.75114e+09 |
| iterations |  3.93053e+08 |  4.35402e+08 |
| max        | 52.592       | 58.71        |
| min        |  7.98        |  7.22        |
| mean       |  9.55563     |  8.61535     |

* benchmark result after this commit
|            |     roundeven |   roundevenf |
|------------|---------------|--------------|
| duration   |   3.73815e+09 |  3.73738e+09 |
| iterations |   5.82692e+08 |  5.91498e+08 |
| max        |  56.468       | 51.642       |
| min        |   6.27        |  6.156       |
| mean       |   6.41532     |  6.3185      |

# Intel(R) Pentium(R) CPU D1508 @ 2.20GHz

* benchmark result before this commit
|            |    roundeven |   roundevenf |
|------------|--------------|--------------|
| duration   |  2.18208e+09 |  2.18258e+09 |
| iterations |  2.39932e+08 |  2.46924e+08 |
| max        | 96.378       | 98.035       |
| min        |  6.776       |  5.94        |
| mean       |  9.09456     |  8.83907     |

* benchmark result after this commit
|            |    roundeven |   roundevenf |
|------------|--------------|--------------|
| duration   |  2.17415e+09 |  2.17005e+09 |
| iterations |  3.56193e+08 |  4.09824e+08 |
| max        | 51.693       | 97.192       |
| min        |  5.926       |  5.093       |
| mean       |  6.10385     |  5.29507     |

I ran each tests about 20 times, and pick a stable result out.

  reply	other threads:[~2021-05-23  0:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-22  0:22 [PATCH v6 1/3] math: redirect roundeven function Shen-Ta Hsieh
2021-05-22  0:22 ` [PATCH v6 2/3] x86_64: roundeven with sse4.1 support Shen-Ta Hsieh
2021-05-22  4:52   ` Paul Zimmermann
2021-05-23  0:41     ` 謝昇達(Shen-Ta Hsieh) [this message]
2021-05-23 16:14       ` Paul Zimmermann
2021-05-23 17:10   ` H.J. Lu
2021-05-23 17:12   ` Noah Goldstein
2021-05-22  0:22 ` [PATCH v6 3/3] Use GCC builtins for roundeven functions if desired Shen-Ta Hsieh
2021-05-23 19:03   ` H.J. Lu
2021-05-24  1:22     ` 謝昇達(Shen-Ta Hsieh)
2021-05-23 18:54 ` [PATCH v6 1/3] math: redirect roundeven function H.J. Lu
2021-05-24  1:39   ` 謝昇達(Shen-Ta Hsieh)

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='CA+fY3Ldipj7UR_FD6pvd8E+2A=sQmdLTiYrk0gPc6P861SddZg@mail.gmail.com' \
    --to=ibmibmibm.tw@gmail.com \
    --cc=Paul.Zimmermann@inria.fr \
    --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).