Files
json/single_include/nlohmann
Niels Lohmann b85d1ca043 Write the one-byte head of an array or object with a single sink write
The head of an array or object of up to 23 elements (15 for MessagePack) is a
single byte, but it was written through write_cbor_head()/write_number(),
which GCC keeps out of line, and a std::array.

The CBOR array and object writers now write that byte directly, and
MessagePack does the same in its array and map prefixes.

Instructions per call (Linux, GCC 13, thousands), to_cbor: citm_catalog 5588 -> 5020, canada 15840 -> 14499, 20000 small objects 13162 -> 12582; to_msgpack: citm_catalog 5920 -> 5676, canada 16344 -> 15676.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-22 09:29:26 +02:00
..