site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LkiR76HGDIOrLF1iB8Py0sbKeVZunihWepx2yjRQF92MqHR2nurYVwJF4CZpyNOcq/DH7ni/skmuamwvWVwR006HRDvTJyq8MuVdjNdRmRm7pMPTC0bjktqTFS6qAumUAXoMlddq7QSWXXwCg6IjEVaZ33WRyJKnWG4EcDYMCJs= Inline is a C99 keyword and still only a "hint" to the compiler. To my knowledge, putting "inline" in a header file doesn't make it's symbols static. And inline functions aren't allowed to also be static. You're probably better off grouping the inline functions into a .c file and then #include'ng it wherever it's needed as well as making the functions static. (though I believe both inline and static is illegal in C99). It also sounds like the compiler is ignoring the hint to inline the functions. And the excuse that it's inlined for performance is pretty bad unless it's a measured speed improvement it. Function call overhead is nowhere near as bad as it was in the 80s. What you should be concerned about is TLB misses and cache warmth etc. Different architectures really do perform differently too. It seems that G5s like linear data accesses as the cache lines are large and misses are costly. Not sure if any of that advice helps... but it's some noise on a mailing list. Dave I'm porting a large application from Windows to OSX. I'm trying to minimize changes to my clients codebase. One area that is giving me problems is inline functions. All over the place the client has functions in header files marked as inline (this is a performance- critical app). These header files get included by multiple .C files. When building with gcc on OSX - what ends up happening is that the compiler puts a copy of each inlined function in each .o file, then when I goto link I get linker errors because of multiple definitions of the same symbol. Anybody have any thoughts on how to resolve this? Thanks, -Chris _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/leimy2k%40gmail.com This email sent to leimy2k@gmail.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On 10/6/06, Chris Edgington <misc@thatsawesomesoftware.com> wrote: This email sent to site_archiver@lists.apple.com