[music-dsp] programming languages for real-time audio

Michael Gogins gogins at pipeline.com
Tue Sep 23 13:14:14 EDT 2008

The shootout does specify the implementation of the language. In the past, I recall seeing some shootouts with different implementations of the same language.

Of course, you are quite correct that the only truly valid benchmark involves performing the exact same task -- take these inputs, give me those outputs -- in the relevant languages.

With respect to software synthesis, I have done just that with all C++, all Java, Lua/C++, Python/C++, and Python/Csound implementations. 

The inputs were a sequence of notes generated by the logistic equation, and the outputs were soundfiles synthesized with a simple frequency modulation instrument. The all C++ implementation was faster than the Python/Csound implementation by about one percent, and 3 times faster than the all Java implementation; the others were slightly slower than the all Java. 

The Java test was done some years ago, and the results might be different today. All of these tests computed the audio signal one sample frame at a time. Normally, software synthesizers compute blocks of sample frames in each iteration of the inner loops. When Csound is used in this way, it is about 3 times faster than with 1 frame at a time. I would expect a similar speedup if I coded the all C++ and all Java synthesizers this way as well. This block efficiency thing may also be changing, since it depends mostly on how much code and data is hanging around in the fastest cache.


-----Original Message-----
>From: David Cournapeau <cournape at gmail.com>
>Sent: Sep 23, 2008 9:25 AM
>To: A discussion list for music-related DSP <music-dsp at music.columbia.edu>
>Subject: Re: [music-dsp] programming languages for real-time audio
>On Tue, Sep 23, 2008 at 9:59 PM, Michael Gogins <gogins at pipeline.com> wrote:
>> The meaningful distinction then, is between the fastest implementation of one language, and the fastest implementation of another language.
>I guess I did not formulate my email correctly, because this was the
>point I thought I was making :) I think the language shootout is not
>adapted for this, because it is too coarse-grained. The language
>shoutout is nice if you want to know the order of magnitude of the
>languages, but it is not precise enough for anything more
>fine-grained. Typically, would you choose java instead of fortran for
>high performance linear algebra ? I believe a better comparison would
>be some basic dsp implemented with a good C compiler and in ocaml.
>dupswapdrop -- the music-dsp mailing list and website: 
>subscription info, FAQ, source code archive, list archive, book reviews, dsp links 

More information about the music-dsp mailing list