This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: fast additive copy method
- From: Joël Krähemann <weedlight at gmail dot com>
- To: Carlos O'Donell <carlos at systemhalted dot org>
- Cc: "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Mon, 11 Aug 2014 01:25:11 +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> <CAE2sS1hTvkvkhiUfJS521466W-n2p9MOL+2U-OtJNN=WkFNYxA at mail dot gmail dot com> <1407703436 dot 8772 dot 15 dot camel at localhost dot localdomain> <CAE2sS1i=UUC7ms-T2JNm39ryPjjG3cH-5byF40++nzSekq6diw at mail dot gmail dot com>
Am Sonntag, den 10.08.2014, 22:53 +0200 schrieb Carlos O'Donell:
> On Sun, Aug 10, 2014 at 10:43 PM, JoÃl KrÃhemann <weedlight@gmail.com> wrote:
> > 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.
>
> There is nothing in glibc that can really help you. It's a compiler
> issue at this point. You need to optimize what you're doing to produce
> good generated object code. You may be able to vectorize much of this
> also, so look into compiler vectorization options and see if you can
> get the compiler to vectorize any loops.
>
> Cheers,
> Carlos.
This seems more interesting:
https://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Function-Attributes.html
Is it possible to pin a function to stack?
For now, I'm doing:
void ags_audio_signal_copy_buffer_to_buffer(signed short *destination,
guint dchannels,
signed short *source,
guint schannels,
guint size)
__attribute__ ((fastcall));