Skip to content
  • Jens Widell's avatar
    Optimize the performance of the group_setup function. · 564e11c9
    Jens Widell authored
    When processing a section that is a member of a group, the group
    that contains it is looked up using a linear search. The resulting
    O(n^2) complexity causes significant performance issues when
    dealing with object files with very many groups.
    
    By remembering the index of the last found group and restarting
    the next search from that index, the search instead becomes O(n)
    in common cases.
    
    	* elf.c (setup_group): Optimize search for group by remembering
    	last found group and restarting search at that index.
    	* elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
    564e11c9
To find the state of this project's repository at the time of any of these versions, check out the tags.