mirror of
https://github.com/nlohmann/json.git
synced 2026-10-22 14:08:13 +00:00
Find the end of a reference token and reject an escape in one loop over the characters instead of two library calls (find_first_of, memchr), and parse an array index straight from the pointer instead of copying the token first. An index that is not a plain number of up to 18 digits (9 for a 32-bit size_type) is left to json_pointer, which reports it as before. patch() on the diff of every eighth scalar (instructions on macOS, Linux Ir GCC 13 / Clang 18): canada 67.7M -> 63.7M, 42.6M -> 38.4M / 43.6M -> 40.0M; citm_catalog 27.1M -> 26.8M, 18.1M -> 17.7M / 18.0M -> 17.7M; twitter unchanged. Signed-off-by: Niels Lohmann <mail@nlohmann.me>