Re: Massive speed improvement in GObject type checking code
- From: Tim Janik <timj gtk org>
- To: Owen Taylor <otaylor redhat com>
- Cc: Erik Walthinsen <omega temple-baptist com>, gtk-list redhat com, Gtk+ Developers <gtk-devel-list gnome org>, gstreamer-devel lists sourceforge net
- Subject: Re: Massive speed improvement in GObject type checking code
- Date: Sun, 17 Jun 2001 14:39:41 +0200 (CEST)
On 17 Jun 2001, Owen Taylor wrote:
> Tim Janik <timj gtk org> writes:
> > however, considering the speed advatage you report, it might be worth
> > lessening the guarantees that G_TYPE_CHECK_INSTANCE_TYPE() makes, so that,
> > for the supposedly pathological case that the instance is broken in that
> > its class contains a non-registered type-id, _and_ this non-registered
> > type id is being checked for, it returns a false TRUE.
> >
> > we still need to get around the double evaluation of the (ip) arg of
> > _G_TYPE_CIT() though, so we'd have to implement it via an auxillary
> > static inline function.
> > the same kind of optimization can be implemented for the class
> > type-checking macro btw.
>
> It's interesting to note that macros such as GTK_OBJECT() have double
> evaluated for a long time, and nobody has ever noticed/complained.
that's why i said "potentially" harmfull ;)
i'm sure you agree that we still need to avoid doubleeval, right?
>
> Regards,
> Owen
>
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]