Thread (13 messages) 13 messages, 5 authors, 2018-09-08

Re: ordered string-list considered harmful, was Re: [PATCH v3] Allow aliases that include other aliases

From: Jonathan Nieder <hidden>
Date: 2018-09-06 23:50:41

Hi,

Jeff King wrote:
But what I think is harmful is a _sorted_ list, because of the
"accidentally quadratic" nature, and because it's easy to call its
functions on an unsorted list.
I agree --- in general, it tends to be better to build an unsorted
string list and then sort it.

Once I've done so, what is your advice about getting fast lookups
in the result?  Should I build an auxiliary hashmap as well?  Or
is this an argument for the 'sorted' flag + BUG approach you
already mentioned?

Whatever we do, I agree with your goal of getting rid of
string_list_insert.

Thanks,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help