This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
RE: fast additive copy method
- From: "Kilian, Jens" <Jens dot KILIAN at advantest dot com>
- To: JoÃl KrÃhemann <weedlight at gmail dot com>
- Cc: "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Mon, 11 Aug 2014 11:04:46 +0000
- Subject: RE: fast additive copy method
- Authentication-results: sourceware.org; auth=none
- References: <1407703436 dot 8772 dot 15 dot camel at localhost dot localdomain>
> -----Original Message-----
> From: JoÃl KrÃhemann [mailto:weedlight@gmail.com]
> Sent: Sunday, 10 August, 2014 22:44
> To: Carlos O'Donell
> Cc: libc-help@sourceware.org
> Subject: Re: fast additive copy method
[...]
> Hi, I'm doing a soft synth therefore in RAM is copied audio buffers in a
> repining way. The function ags_audio_signal_copy_buffer_to_buffer()
> should be optimized.
First, you seem to be adding (short) ints with wraparound (0x7fff + 1 -> -0x8000). For audio signals a saturating addition (0x7fff + 1 -> 0x7fff) may be more appropriate.
Second, you want to look into whether your compiler supports vectorized operations, aka. MMX/SSE/etc.; either via autovectoring or special intrinsic functions (which are less portable).
Hope this helps,
Jens.