This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fast additive copy method


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]