This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use binary search instead of linear search in corefile.c of gprof



On Jun 15, 2009, at 3:11 PM, Dongsheng Xing wrote:



Hi!


This patch replace linear search by binary search in core_create_syms_from().

This is implemented by qsort(symbol_map) in read_function_mappings() by function name, thus we can do binary search in core_create_function_syms() based on function name.

Just being curious: if you sort with qsort(), why don't you search with bsearch() ?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]