[Csnd] Efficiency of faustgen vs faust2csound
Date | 2021-09-06 21:41 |
From | Michael Gogins |
Subject | [Csnd] Efficiency of faustgen vs faust2csound |
I did an experiment to compare the runtime speed of the same DSP algorithm (a physical model of a guitar) implemented using Csound's "faustgen" opcodes, versus a plugin opcode implemented using Faust's "faust2csound" tool.
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
The faustgen version runs about 15% than the compiled C++ version. Of course using the faustgen version assumes that one's computer has both LLVM and an installation of Faust with the LLVM back end. Details here: https://github.com/gogins/csound-extended/issues/187. Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com |
Date | 2021-09-06 21:48 |
From | Dave Seidel |
Subject | Re: [Csnd] Efficiency of faustgen vs faust2csound |
!5% slower or faster? On Mon, Sep 6, 2021 at 4:41 PM Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2021-09-06 22:09 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Efficiency of faustgen vs faust2csound |
Faster by the looks of it (87% of the time of the compiled C++ code) ======================== Prof. Victor Lazzarini Maynooth University Ireland > On 6 Sep 2021, at 21:48, Dave Seidel |
Date | 2021-09-06 22:12 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Efficiency of faustgen vs faust2csound |
It’s an interesting result, I’d have thought the opposite would be the case, it just shows how much LLVM has come along. If we had the resources to do it, a LLVM compiler for UDOs would have been great to have. ======================== Prof. Victor Lazzarini Maynooth University Ireland > On 6 Sep 2021, at 21:41, Michael Gogins |
Date | 2021-09-06 22:24 |
From | Michael Gogins |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Efficiency of faustgen vs faust2csound |
I also had the thought of LLVM for Csound orchestra code, and also didn't feel that I had the resources to do it. One great thing about that though would be cross-platform native speed. In fact I think that would be a really great thing. Another approach would be -- just write UDOs in C or C++ and embed them in the Csound orchestra and compile them with LLVM. Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Mon, Sep 6, 2021 at 5:12 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote: It’s an interesting result, I’d have thought the opposite would be the case, it just shows how much LLVM has |
Date | 2021-09-06 22:38 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Efficiency of faustgen vs faust2csound |
For Csound-language UDOs we would need to write a compiler for it. We could reuse the parser, so it’s possible but it would not be easy. My thinking is that it may be possible to first do something that would support arithmetic in init, control, and audio rates. I had a sketch for it in my head, based on something I discussed in Italy. Once that is working, then start supporting some opcodes like oscillators. But what you’re saying is something I never thought of before, a just-in-time C/C++ compiler. It may be achievable. ======================== Prof. Victor Lazzarini Maynooth University Ireland > On 6 Sep 2021, at 22:24, Michael Gogins |
Date | 2021-09-07 08:49 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Efficiency of faustgen vs faust2csound |
another thing to consider it is that (I am supposing) your C++ is gcc and LLVM is a different compiler. Maybe it’s a little better. A clang++ vs g++ comparison should demonstrate that too. ======================== Prof. Victor Lazzarini Maynooth University Ireland > On 6 Sep 2021, at 21:41, Michael Gogins |
Date | 2021-09-07 08:59 |
From | Eduardo Moguillansky |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Efficiency of faustgen vs faust2csound |
I would argue that such a small difference is probably due to compilation flags. llvm can compile to native whereas the faust2csound script is really very poorly configured and should not be used for anything serious. On 07.09.21 09:49, Victor Lazzarini wrote: > another thing to consider it is that (I am supposing) your C++ is gcc and LLVM is a different compiler. > Maybe it’s a little better. A clang++ vs g++ comparison should demonstrate that too. > ======================== > Prof. Victor Lazzarini > Maynooth University > Ireland > >> On 6 Sep 2021, at 21:41, Michael Gogins |