GNOME Bugzilla – Bug 732084
gvalue: Avoid expensive checks where possible
Last modified: 2018-05-24 16:41:36 UTC
Various GValue functions use G_IS_VALUE and G_TYPE_IS_VALUE to check whether the provided GValue or GType is valid. The problem is two-fold: * Those checks are expensive (sometimes represent more than 50% of the total cost of the function!) * Later calls to g_type_value_table_peek will validate whether the GValue (and type) is valid for usage This commit replaces most calls to G_IS_VALUE and G_TYPE_IS_VALUE By simpler checks and delegate the full validation to later function calls Speeds up these various functions between 20% and .. 300%
Created attachment 278977 [details] [review] gvalue: Avoid expensive checks where possible
Any comments ?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/894.