This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] |
On 13-03-26 04:41 PM, Jan Kratochvil wrote:
>+ >+ if (build_id_list_p) >+ qsort (VEC_address (build_id_list_s, data.list), >+ VEC_length (build_id_list_s, data.list), >+ sizeof (build_id_list_s), compare_build_id_list);It is always already sorted by Linux kernel, rather a for cycle to verify it really is sorted.
Can we guarantee this is always the case? Even if it is, qsort would do similar to what a loop would (i.e. no moves would take place).
I'd leave it with qsort unless you feel strongly about it.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |