Files
json/include/nlohmann/detail/view
Niels Lohmann 6548a65b46 json_view: keep GCC from cloning scan_string_vector
With the builder of accept() in the same translation unit, GCC 16's
interprocedural constant propagation cloned scan_string_vector without its
plain argument (always string_plain()). The parse loop of
json_document::parse() then called the clone, and GCC generated different
code for the whole loop: 0.7-1.2 % more instructions (twitter, citm_catalog,
instruments, tree-pretty, canada) and up to +13 % time on citm_catalog.
NLOHMANN_VIEW_NOCLONE (GCC only) keeps the function as written; the
instruction counts of parse() are then those of develop again.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-31 18:03:40 +01:00
..