[gst-devel] Re: Massive speed improvement in GObject type checking code

Alex Larsson alexl at redhat.com
Mon Jun 18 18:18:23 CEST 2001


On Sun, 17 Jun 2001, Tim Janik wrote:

> > I'm not sure. Considering that inline functions in C or statement
> > expressions aren't portable, and I think GObject should probably
> > perform portably, it's conceivable that the danger is worth it.
> > I think it was worth it for the GTK_OBJECT() macro.
>
> i don't think there's much to worry about compilers that can't inline
> nowadays. glib ensures that static inline at least works on such systems
> by providing a non-static linkable version, if static inline isn't supported.
> so worst-case scenario is that for inline-incapable compilers an extra
> function call is performed.

I'd like to point out here that GCC produces better code for macros than
inline functions. This will continue to be true in GCC 3.0, and in the
future until the tree inliner is ported from the c++ compiler to the c
compiler.

/ Alex






More information about the gstreamer-devel mailing list