summaryrefslogtreecommitdiff
path: root/sigchain.h
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2012-11-04 08:07:08 +0100
committerLibravatar Jeff King <peff@peff.net>2012-11-08 11:34:36 -0500
commit131352433621e89b2e8c58d8327b1d55bf0bc8d0 (patch)
tree9e1b10b0054233197d648d5af5dbcd531bef01ea /sigchain.h
parentInitialize sort_uniq_list using named constant (diff)
downloadtgif-131352433621e89b2e8c58d8327b1d55bf0bc8d0.tar.xz
combine_notes_cat_sort_uniq(): sort and dedup lines all at once
Instead of reading lines one by one and insertion-sorting them into a string_list, read all of the lines, sort them, then remove duplicates. Aside from being less code, this reduces the complexity from O(N^2) to O(N lg N) in the total number of lines. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'sigchain.h')
0 files changed, 0 insertions, 0 deletions