Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sun, 24 Feb 2019 22:25:05 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Cc: Joe Duarte <songofapollo@...il.com>
Subject: Re: [PATCH 00/18] math updates

* Joe Duarte <songofapollo@...il.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@...t70.net> wrote:
> 
> > add new code from
> >
> >  https://github.com/ARM-software/optimized-routines
> >
> >

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.