Files
json/include/nlohmann
Niels Lohmann 7241ba94c8 Encode runs of numbers in BON8 arrays without a call each
A number in a BON8 array went through write_bon8_value(), the ladder of
write_bon8_integer() and one sink write per byte of its encoding (through a
std::array for each).

An array that starts with a number now encodes its runs of integers and floats
straight into space reserved from the sink, as the other formats do. An
unsigned integer above the int64 range, which BON8 cannot write, is passed to
write_bon8_value(), which throws exactly as before after the same bytes. So
is an integer of a number type wider than 64 bits that does not fit.

Instructions per call (Linux, GCC 13, thousands), to_bon8: 20000 integers 2375 -> 1002, 20000 floats 3173 -> 1607, canada 22130 -> 15558.

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