Skip to content

gstvalue: Avoid expensive fallback on intersection

Edward Hervey requested to merge bilboed/gstreamer:value-optims into master

The type checks at the end of gst_value_intersect to call the flagset intersection are relatively expensive.

If we already know that:

  • There was a compare function but it didn't return GST_VALUE_EQUAL
  • AND none of the registered intersect functions failed

Then we know they can't intersect and can return early.

Trims ~20% of the instruction calls

Merge request reports