Csound Csound-dev Csound-tekno Search About

[Csnd] semi OT: compilers

Date2013-08-02 15:29
Fromfrancesco
Subject[Csnd] semi OT: compilers
Hello All,
just a curiosity. Having installed LLVM3.2 i've compiled Csound6 with this
instead
of GCC4.6. Now, because i'm ignorant, what could be the differences in
Csound?
I mean compilers can generate a better program? Could be Csound more
efficiently build?
Sorry for this trivial question, it's only curiosity.

Thanks,
ciao,
francesco.




--
View this message in context: http://csound.1045644.n5.nabble.com/semi-OT-compilers-tp5726248.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-08-03 21:57
FromDavid Akbari
SubjectRe: [Csnd] semi OT: compilers
Hello Francesco,

I have been using Intel's "icc" (for C) and "icpc" (for C++) compilers to build Csound since version 5.00. Those particular compilers are optimized for certain Intel-based chipsets. The differences between icc and gcc compiled Csound are subtle, but noticeable. Practically speaking, you tend to see orchestra compilation happen a bit faster. The biggest speed bonus is in generating function tables (either in the score or using ftgen in the orchestra). It does _not_ make a well-made instrument (like something from the Csound Catalog) run any differently or sound any differently than normal. It definitely helps run some of the more complicated instrument setups on lower-powered embedded systems more efficiently. You will have to decide what tool is the right one for your envisioned application.

If you tend to use a lot of dynamic waveguide synthesis in your work, prefer to use function tables for sample indexing instead of disk streaming, or like to generate a lot of tables dynamically in a running orchestra, the speed benefits are notable. I am not sure how LLVM works internally but in the case of the Intel compiler there are hardware trigonometry instructions which I hypothesize contribute to the speed up in generating function tables (like sine waves). I had been using the icc/icpc compiler to get a massive speedup when generating function tables on the fly indexing dynamically generated velocity contours with dynamic multi-sample crossfading [between layered samples] in MIDI instruments. You might find specific application success using alternative compilers as well! That said, you can't beat the general compatibility of the gcc compiler.

Cheers,
David


On Fri, Aug 2, 2013 at 9:29 AM, francesco <ilterzouomo@fastwebnet.it> wrote:
Hello All,
just a curiosity. Having installed LLVM3.2 i've compiled Csound6 with this
instead
of GCC4.6. Now, because i'm ignorant, what could be the differences in
Csound?
I mean compilers can generate a better program? Could be Csound more
efficiently build?
Sorry for this trivial question, it's only curiosity.

Thanks,
ciao,
francesco.




--
View this message in context: http://csound.1045644.n5.nabble.com/semi-OT-compilers-tp5726248.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2013-08-03 22:17
FromJustin Smith
SubjectRe: [Csnd] semi OT: compilers
I hope it isn't pedantic to clarify that gcc isn't compatible with other compilers (even with itself over time). It is portable though (compatible with various architectures?), much more than any other c compiler I know of.


On Sat, Aug 3, 2013 at 1:57 PM, David Akbari <dakbari@gmail.com> wrote:
Hello Francesco,

I have been using Intel's "icc" (for C) and "icpc" (for C++) compilers to build Csound since version 5.00. Those particular compilers are optimized for certain Intel-based chipsets. The differences between icc and gcc compiled Csound are subtle, but noticeable. Practically speaking, you tend to see orchestra compilation happen a bit faster. The biggest speed bonus is in generating function tables (either in the score or using ftgen in the orchestra). It does _not_ make a well-made instrument (like something from the Csound Catalog) run any differently or sound any differently than normal. It definitely helps run some of the more complicated instrument setups on lower-powered embedded systems more efficiently. You will have to decide what tool is the right one for your envisioned application.

If you tend to use a lot of dynamic waveguide synthesis in your work, prefer to use function tables for sample indexing instead of disk streaming, or like to generate a lot of tables dynamically in a running orchestra, the speed benefits are notable. I am not sure how LLVM works internally but in the case of the Intel compiler there are hardware trigonometry instructions which I hypothesize contribute to the speed up in generating function tables (like sine waves). I had been using the icc/icpc compiler to get a massive speedup when generating function tables on the fly indexing dynamically generated velocity contours with dynamic multi-sample crossfading [between layered samples] in MIDI instruments. You might find specific application success using alternative compilers as well! That said, you can't beat the general compatibility of the gcc compiler.

Cheers,
David


On Fri, Aug 2, 2013 at 9:29 AM, francesco <ilterzouomo@fastwebnet.it> wrote:
Hello All,
just a curiosity. Having installed LLVM3.2 i've compiled Csound6 with this
instead
of GCC4.6. Now, because i'm ignorant, what could be the differences in
Csound?
I mean compilers can generate a better program? Could be Csound more
efficiently build?
Sorry for this trivial question, it's only curiosity.

Thanks,
ciao,
francesco.




--
View this message in context: http://csound.1045644.n5.nabble.com/semi-OT-compilers-tp5726248.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"