mirror of
https://github.com/nlohmann/json.git
synced 2026-10-06 06:30:31 +00:00
- With SSE2, string runs are checked 16 bytes at a time from their first byte: one compare finds the end of most keys and short values, faster on x86-64 than a branch per byte. AArch64 keeps the byte steps (there, a NEON mask costs more and the branches predict well; vector-first was 20% slower on Apple M1). - open() stores the parent's frame field by field. Built on the stack and copied, it was read back by loads wider than its stores, which waited for them (store forwarding fails): 18% of the time on citm_catalog.json. Parse on x86-64 (GCC 13 / Clang 18, us): twitter 352 -> 306 / 316 -> 288, citm_catalog 1000 -> 770 / 843 -> 692, canada 1941 -> 1687 / 1978 -> 1722. Unchanged on Apple M1. Signed-off-by: Niels Lohmann <mail@nlohmann.me>