Files
json/single_include
Niels Lohmann f41f6408eb Write a MessagePack float that is not in an array of numbers into reserved space
A float that was not part of a run in an array (an object member, a float in a
mixed array) went through write_compact_float(), with a sink call for its
marker and one through a std::array for its bytes.

It is now encoded by the function that encodes the floats of a run, into space
reserved from the sink.

CBOR keeps the previous code for these floats: giving them the same treatment
made GCC 13 stop inlining the encoder into the loop for the floats of an array,
which cost 4 percent more instructions for canada and citm_catalog.

Instructions per call (Linux, GCC 13, thousands), to_msgpack: 20000 small objects 14601 -> 13641.

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