From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13860 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 00/18] math updates Date: Sun, 24 Feb 2019 22:25:05 +0100 Message-ID: <20190224212504.GB21289@port70.net> References: <20181208125009.GY21289@port70.net> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="152119"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Joe Duarte To: musl@lists.openwall.com Original-X-From: musl-return-13876-gllmg-musl=m.gmane.org@lists.openwall.com Sun Feb 24 22:25:22 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1gy1Gy-000dRT-9W for gllmg-musl@m.gmane.org; Sun, 24 Feb 2019 22:25:20 +0100 Original-Received: (qmail 27677 invoked by uid 550); 24 Feb 2019 21:25:17 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 27656 invoked from network); 24 Feb 2019 21:25:16 -0000 Mail-Followup-To: musl@lists.openwall.com, Joe Duarte Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:13860 Archived-At: * Joe Duarte [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 wrote: > > > add new code from > > > > https://github.com/ARM-software/optimized-routines > > > >