> Instead of a linked list, how about using a dynamic array? > > https://en.wikipedia.org/wiki/Dynamic_array > > This would give you constant-time lookups, amortized constant time > insertions and deletions, and better data locality and cache behavior. > > What do you think?
It's a good idea, in the lwip mailing list someone proposed to use a hash table too. A linked list is a simple solution that works for now, but using another approach would be better.