[PATCH][RFC] Improve get_qualified_type linear list walk

Marc Glisse marc.glisse@inria.fr
Wed Apr 17 20:36:00 GMT 2019


On Wed, 17 Apr 2019, Jeff Law wrote:

>> 	* tree.c (get_qualified_type): Put found type variants at the
>> 	head of the variant list.
> Seems quite reasonable to me.   I just hope we don't find a case where
> this is the exact worst case behavior ;-)

That seems unlikely. Competitive analysis of the list update problem shows 
that the move-to-front strategy is 2-competitive. Here we also have 
insertions so the problem is different, but still close.

-- 
Marc Glisse



More information about the Gcc-patches mailing list