chiark / gitweb /
strbuf: replace quick sort with bubble sort
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 31 Mar 2013 02:12:56 +0000 (22:12 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 31 Mar 2013 18:35:17 +0000 (14:35 -0400)
commit3c8bed4ee061f96acb4d70a591a9849bddd2a659
tree9be6b06310d2e8837dfe928487e5a47aee4fde03
parenta9c307e5d2157c561eae7fc76303cadf7a77b99e
strbuf: replace quick sort with bubble sort

No need to call the heavy artillery, when the original array
is sorted. Reduces complexity from n² log n to n log n, where
n is the number of items in the array, not very large, but
still.
src/shared/strbuf.c