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: Ævar Arnfjörð Bjarmason <hidden>
Date: 2018-09-07 07:20:18

On Fri, Sep 07 2018, Jonathan Nieder wrote:
Jeff King wrote:
quoted
I don't see any point in generating a sorted list and _then_ making an
auxiliary hashmap. My idea was that if you're using a sorted string-list
for lookup, then you can replace the whole thing with a hash (inserting
as you go, rather than sorting at the end).
What if I'm sorting a string list in preparation for emitting a sorted
list, and I *also* want to perform lookups in that same list?  In
other words:
If this turns out to be a common use-case perhaps the easiest way to
support that would be to make the hashmap (optionally?) ordered, as Ruby
1.9 did with their hash implementation:
https://www.igvita.com/2009/02/04/ruby-19-internals-ordered-hash/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help