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


> -----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.

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