nlohmann / fifo_map

a FIFO-ordered associative container for C++
MIT License
179 stars 77 forks source link

Isn't the time complexity a little high, when `for (auto x : m) { ... }`? #10

Open daidai21 opened 3 years ago

daidai21 commented 3 years ago

Isn't the time complexity a little high, when for (auto x : m) { ... }? One iteration calls fifo_map_compare n^2 times.

I think the time complexity of such a structure can be lower:

For loop just iterates through the queue.

Looking forward to your reply!