|
|
In article <3e778de3@news.povray.org> , "Mael" <mae### [at] hotmailcom> wrote:
> A little remark after looking at the (nice) isosurface code :
> Vector_IsoSurface_Function, Float_IsoSurface_Function, Evaluate_Function are
> declared as inline functions but only defined at the end of isosurf.cpp. It
> seems gcc(g++) will not inline the function if the call is before the
> definition. If you want gcc to actually inline those functions they should
> be moved at the top of the file (with Evaluate_Function first)
> A quick test with scene isosurfaces.pov on a x86 linux (and gcc3.2) gives
> 114s vs 116s only by moving the functions
Indeed, some compilers cannot inline such functions for odd reasons. Apart
from a workaround, I would suggest to send a feature request to the compiler
maker because in the end "inline" is just a guide and not a requirement for
the compiler to make the function inline.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|