mirror of
https://github.com/nlohmann/json.git
synced 2026-11-01 10:25:43 +00:00
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>