mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Cc: Joe Duarte <songofapollo@gmail.com>
Subject: Re: [PATCH 00/18] math updates
Date: Sun, 24 Feb 2019 22:25:05 +0100	[thread overview]
Message-ID: <20190224212504.GB21289@port70.net> (raw)
In-Reply-To: <CAESemU8jCbX9Rw08QJzT-hdFvLQbzKjWivOsUhnttrrCcOFLBg@mail.gmail.com>

* Joe Duarte <songofapollo@gmail.com> [2019-02-24 12:58:27 -0800]:
> Question: Is there a similar set of optimized math routines from Intel or
> AMD for x86-64? Are they already incorporated into musl?

amd has a freely available math library, but only binary
(the implementation is likely target specific using x86_64
specific asm or intrinsics, so even if it were open source
we may not be able to use it)

intel has optimized math library distributed with its
proprietary toolchain (icc), i believe parts of it are
contributed to various opensource projects (asm only).

but the code proposed here is generic and based on my
measurements it is just as fast as those libs on x86_64
cpus, so there is no reson to use them. (there are
exceptions: the intel/amd libs have vector math code,
which rely on compiler support to turn a sin(x) call
in a loop into a vector_sin(v) call and process multiple
inputs at once and they have runtime cpu detection and
use different code e.g. if the hardware has fma or not,
we don't plan to support such things)

the same code got upstreamed to newlib, bionic and
glibc (bionic and glibc dropped several handwritten
x86 asm code beacuse the new c code was faster on
x86 hardware)

> On Sat, Dec 8, 2018 at 4:50 AM Szabolcs Nagy <nsz@port70.net> wrote:
> 
> > add new code from
> >
> >  https://github.com/ARM-software/optimized-routines
> >
> >


      reply	other threads:[~2019-02-24 21:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-08 12:50 Szabolcs Nagy
2018-12-08 12:54 ` [PATCH 01-10/18] " Szabolcs Nagy
2018-12-08 12:56 ` [PATCH 11-18/18] " Szabolcs Nagy
2019-02-23 23:36 ` [PATCH 00/18] " Rich Felker
2019-02-24 21:00   ` Szabolcs Nagy
2019-02-24 20:58 ` Joe Duarte
2019-02-24 21:25   ` Szabolcs Nagy [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=20190224212504.GB21289@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    --cc=songofapollo@gmail.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).