Re: [linux-audio-dev] code in different files affects speed?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] code in different files affects speed?
From: Paul Davis (paul_AT_linuxaudiosystems.com)
Date: Sun Dec 08 2002 - 19:06:22 EET


> From a 'C optimisation tutorial'
>
>http://www.abarnett.demon.co.uk/tutorial.html
>
># Compilers can often optimise a whole file - avoid splitting off
>closely related functions into separate files, the compiler will do
>better if can see both of them together (it might be able to inline the
>code, for example). #

yes, well ... it depends on what "closely related" means. i recently
split ardour's mammoth session.cc into several files and have noticed
a noticeable drop in performance since then. the split was done along
the lines of "closely related" functions. also, as far as inlining
goes, everything that i believe can be sensibly inlined is in a header
file, not a source file itself.

i'll try the trick of a single to-be-used-by-the-compiler file that
just includes all the others, and see if that helps things.

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Dec 08 2002 - 19:02:37 EET