mirror of
https://github.com/nlohmann/json.git
synced 2026-10-15 10:47:13 +00:00
- destroy: free a container whose children are all leaves in one go (object of 100k ints: 41.8 -> 17.4 ns/member); the walk stays non-recursive and allocation-free. - iter_impl: check array, then object, before the type switch in ++, *, -> and ==; cold throws moved out of line (range-for over an array 2.5 -> 1.3 ns/element). - diff(): one find per source key, lazily built "add" operations, children compared with == before building their path (diff of citm with 1% changes 1.09 -> 0.70 ms). Output is byte-identical. Signed-off-by: Niels Lohmann <mail@nlohmann.me>