gst/gstcaps.c: Callgrind micro optimisations.
authorWim Taymans <wim.taymans@gmail.com>
Thu, 6 Nov 2008 15:09:34 +0000 (15:09 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Thu, 6 Nov 2008 15:09:34 +0000 (15:09 +0000)
commit18aeb9a41e04c5d66c7a5ee8c496130dc06dec75
tree3c83e9140365b8f8aa50d874078fc6ce4fabb17f
parent812640dd1881e5f1975bfa6803b5b66cbef83a48
gst/gstcaps.c: Callgrind micro optimisations.

Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_copy), (_gst_caps_free),
(gst_caps_merge_structure), (gst_caps_get_structure),
(gst_caps_copy_nth), (gst_caps_set_simple),
(gst_caps_set_simple_valist), (gst_caps_is_fixed),
(gst_caps_is_equal_fixed), (gst_caps_intersect),
(gst_caps_subtract), (gst_caps_normalize), (gst_caps_do_simplify),
(gst_caps_to_string):
Callgrind micro optimisations.
Avoid array bounds checks and force inline of trivial function.
* gst/gstobject.c: (gst_object_set_name_default):
-1 is equivalent to letting glib to the strlen but then there is more
room for optimisations and it's not our fault.
* gst/gststructure.c: (gst_structure_id_empty_new_with_size):
no need to clear the array, we're cool.
* gst/gstvalue.c: (gst_type_is_fixed), (gst_value_is_fixed):
The most common _is_fixed() check is done on fundamental glib base
types so we check this first instead of doing a huge amount of
useless GST_TYPE_ARRAY calls.
ChangeLog
gst/gstcaps.c
gst/gstobject.c
gst/gststructure.c
gst/gstvalue.c