Open GoogleCodeExporter opened 9 years ago
Isn't lookup in a map O(log n)?
Original comment by oster.t...@gmail.com
on 29 Jan 2013 at 7:05
Right now it's O(n).
Original comment by jbe...@gmail.com
on 29 Jan 2013 at 9:09
[deleted comment]
Just to clarify, the issue is that yaml-cpp linearly searches through the keys
ATM, hence the O(N), std::map is indeed O(log n) though.
Original comment by domuradi...@gmail.com
on 30 Jan 2013 at 2:27
Yes; but the plan isn't to use std::map, but a hashmap, which is O(1).
Original comment by jbe...@gmail.com
on 30 Jan 2013 at 3:22
std::unordered_map is O(1) to O(n), this probably depends on reallocations and
other memory things. std::map is O(log n). Since YAML stores the entire file in
Nodes now it makes sense to organize it into a map and vector setup for maps
and sequences.
If this is changed to do that, please allow access to the maps and vectors.
Original comment by ARandomFurry
on 2 Feb 2014 at 2:05
Original issue reported on code.google.com by
jbe...@gmail.com
on 28 Nov 2012 at 12:19