This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: fast additive copy method
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: JoÃl KrÃhemann <weedlight at gmail dot com>
- Cc: "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Sun, 10 Aug 2014 17:20:48 +0200
- Subject: Re: fast additive copy method
- Authentication-results: sourceware.org; auth=none
- References: <1407648757 dot 15843 dot 2 dot camel at localhost dot localdomain>
On Sun, Aug 10, 2014 at 7:32 AM, JoÃl KrÃhemann <weedlight@gmail.com> wrote:
> Hi, I'm doing a soft synth and I'm looking for fast additive copy
> methods. Does glibc provide such functions?
Please define fast additive copy methods?
What types do you need to add together?
If using floating point arithmetic: does the answer need to be
correctly rounded, can the answer be imprecise etc. etc. ?
Simple computation like add and copy are just done by the language.
e.g.
a = a + b;
There is some ability for the compiler to turn this into a
fused-multipley-and-add instruction which is quite quick.
e.g.
a = a + b => a = 1 * a +b (implemented on x86* with FMA by the compiler).
However, the addition is also quite quick, and may take less cycles so
the compiler might choose just an add.
Cheers,
Carlos.