mirror of
https://github.com/nlohmann/json.git
synced 2026-10-22 22:08:55 +00:00
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>