[music-dsp] C# Interpolation Code
chriswea at microsoft.com
Thu Jan 29 20:19:43 EST 2004
While it is true that there is a virtual machine involved, there is some
confusion as to when native code is executed. C# code is not repeatedly
run as IL. Instead, it uses a JIT compilation mechanism similar to
Java. Code that is run repeatedly has a good chance of running native.
Of course, this does not contradict your point that C++ is going to be
faster (unless you talk to the JIT purists who keep promising that
processing context will enable JIT approaches to someday be faster than
native code for certain applications. This has not happened yet as far
as I am aware).
From: music-dsp-bounces at shoko.calarts.edu
[mailto:music-dsp-bounces at shoko.calarts.edu] On Behalf Of Michael Gogins
Sent: Wednesday, January 28, 2004 6:26 PM
To: a list for musical digital signal processing
Subject: Re: [music-dsp] C# Interpolation Code
C++ is the best language for complex software that also has to run fast.
is also difficult to learn. C# is not as fast because C# source code is
compiled to intermediate language, which is object language for a
machine. So when a C# program is executing, the host computer runs a
machine, and the virtual machine runs the intermediate language. C++
compiles directly to object language for the host computer, so there is
less layer of abstraction between your ideas and the microprocessor. The
actual speed difference would depend on the type of code you write, and
many cases C# would actually be almost as fast as C++. However, most
existing audio processing code is written in C or C++, which links
with C++ code. Those same libraries can be used from C# programs, but
only by going through an extra step of translation, either by writing
"managed C++" wrappers, or using the PINVOKE facility to call from C#
into a DLL that would probably be compiled in C++.
The speed advantage and libraries advantage of C++ are likely to be
as time goes on, but they are not going to vanish as long as C# depends
virtual machine, so C++ or C are going to be the recommended languages
efficient application programming, especially in audio and multimedia,
the foreseeable future.
gogins at pipeline period com
CsoundVST, an extended version of Csound for programming music and sound
Available at http://sourceforge.net/projects/csound/
----- Original Message -----
From: "Roger Waters" <rogerwaters at fastmail.fm>
To: "a list for musical digital signal processing"
<music-dsp at shoko.calarts.edu>
Sent: Wednesday, January 28, 2004 6:07 PM
Subject: RE: [music-dsp] C# Interpolation Code
> Thank you for your replies!
> The company I work for uses .NET as their main development platform.
> Angelo, why exactly is C# slower? Would you recommend C++ instead?
> about VC++?
> On Tue, 27 Jan 2004 17:07:00 +0100, "Angelo Farina"
> <farina at pcfarina.eng.unipr.it> said:
> > I don't think that C# is a good programming language for DSP... We
> > it
> > some months ago, and in the benchmark it was approximately slower by
> > factor ten than the good, old, "unmanaged" C. We tested with FFT
> > algorithms
> > and linear convolutions, but I suppose that the same hold
> > for
> > any algorithm.
> > Why hell are You planning to use C# for DSP ???
> > Bye!
> > Angelo Farina
> > > -----Original Message-----
> > > From: music-dsp-bounces at shoko.calarts.edu
> > > [mailto:music-dsp-bounces at shoko.calarts.edu] On Behalf Of Roger
> > > Sent: 27 January 2004 01:52
> > > To: music-dsp at shoko.calarts.edu
> > > Subject: [music-dsp] C# Interpolation Code
> > >
> > > I'm new to C# and am looking for a linear or spline
> > > interpolation code in C#. Does anybody know of a site where
> > > I can view similar code, or would anybody be willing to share
> > > some code for me to study?
> > >
> > > Thank you :)
> > >
> > > --
> > > http://www.fastmail.fm - Choose from over 50 domains or use
> > > your own dupswapdrop -- the music-dsp mailing list and website:
> > > subscription info, FAQ, source code archive, list archive,
> > > book reviews, dsp links http://shoko.calarts.edu/musicdsp
> > > http://ceait.calarts.edu/mailman/listinfo/music-dsp
> > >
> > dupswapdrop -- the music-dsp mailing list and website:
> > subscription info, FAQ, source code archive, list archive, book
> > dsp links
> > http://shoko.calarts.edu/musicdsp
> > http://ceait.calarts.edu/mailman/listinfo/music-dsp
> http://www.fastmail.fm - Does exactly what it says on the tin
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews,
More information about the music-dsp