Closed GoogleCodeExporter closed 9 years ago
According to the spec, "In the representation model, mapping keys do not have
an order... In every case where node order is significant, a sequence must be
used. For example, an ordered mapping can be represented as a sequence of
mappings, where each mapping is a single key: value pair. YAML provides
convenient compact notation for this case."
http://www.yaml.org/spec/1.2/spec.html#id2765608
Is your bug report then about lookups being O(n)? I plan, eventually, to make
string key lookups O(log n), but in the general case (looking up an arbitrary
node as a key), it has to be O(n), because those can't be sorted.
Original comment by jbe...@gmail.com
on 18 Jul 2012 at 4:23
well, crap. someone needs to hit Doctrine over the head with the spec, then.
honestly I don't mind about the speed of key lookups. it just struck me as odd.
:)
Original comment by chan...@gmail.com
on 18 Jul 2012 at 4:29
Yeah, that's just laziness, not to make an exception for strings :)
Original comment by jbe...@gmail.com
on 18 Jul 2012 at 4:34
Original issue reported on code.google.com by
chan...@gmail.com
on 18 Jul 2012 at 4:18