]> git.sesse.net Git - mlt/commitdiff
Remove pessimization in mlt_properties.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 18 Jan 2014 02:07:47 +0000 (03:07 +0100)
committerDan Dennedy <dan@dennedy.org>
Sun, 26 Jan 2014 20:42:44 +0000 (12:42 -0800)
This attempt at optimization is actually detrimental on modern CPUs.
Removing it helps playback speed ~0.3%. mlt_properties_get_data() is now
down to ~0.6%.

src/framework/mlt_properties.c

index 2a37ab4d9f84613752bb5288874114d781dc5aa6..3b42ceebbbd8200e99bfb7a56be7370a0b167701 100644 (file)
@@ -507,13 +507,12 @@ static inline mlt_property mlt_properties_find( mlt_properties self, const char
        {
                // Check if we're hashed
                if ( list->count > 0 &&
-                       name[ 0 ] == list->name[ i ][ 0 ] &&
                        !strcmp( list->name[ i ], name ) )
                        value = list->value[ i ];
 
                // Locate the item
                for ( i = list->count - 1; value == NULL && i >= 0; i -- )
-                       if ( name[ 0 ] == list->name[ i ][ 0 ] && !strcmp( list->name[ i ], name ) )
+                       if ( !strcmp( list->name[ i ], name ) )
                                value = list->value[ i ];
        }
        mlt_properties_unlock( self );