Niels Lohmann
6d5581c4e8
CBOR/MessagePack readers: leave one-element arrays to the general path ( #6008 )
...
enter_cbor_array and enter_msgpack_array called the out-of-line scalar
run for every non-empty array. When the array's element is an object or
an array, as on every level of [[...]] or the single ring of a GeoJSON
polygon, the call reads nothing; it made 1,000 arrays nested in each
other cost 4 % more instructions (GCC 13) and up to 8 % more time (Apple
clang) than without the run. #5975 had fixed that with an inline
pre-check, which was later dropped after measuring canada only.
The run is now entered only for arrays of two or more elements: the same
comparison as before, so no other row changes. Arrays of one scalar,
which the run read faster, now take the general path; they are rare in
documents (one in citm_catalog, none in twitter or canada). The new
benchmark FromBinaryShape/singles measures them, next to
FromBinaryShape/nested.
Instructions per repetition, new/old, GCC 13 callgrind: nested arrays
0.973 (CBOR) and 0.971 (MessagePack), arrays of one scalar 1.037 and
1.021, every other row within 0.15 %.
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-11-02 18:25:44 +01:00
..
2026-10-17 08:28:28 +02:00
2026-10-11 08:24:31 +02:00
2026-10-11 08:24:31 +02:00
2026-10-14 17:38:36 +02:00
2026-10-15 20:04:57 +02:00
2026-01-01 20:00:39 +01:00
2026-10-25 12:07:51 +01:00
2026-10-15 20:04:57 +02:00
2026-10-15 20:04:57 +02:00
2026-10-15 20:04:57 +02:00
2026-10-15 20:04:57 +02:00
2026-10-25 12:07:51 +01:00
2026-10-15 20:04:57 +02:00
2026-10-15 20:04:57 +02:00
2026-10-15 20:04:57 +02:00
2026-11-01 17:25:26 +01:00
2026-01-01 20:00:39 +01:00
2026-10-01 07:33:07 +02:00
2026-10-01 07:33:07 +02:00
2026-10-11 08:21:13 +02:00
2026-09-16 20:15:46 +02:00
2026-10-06 22:53:03 +02:00
2026-10-01 07:33:07 +02:00
2026-10-15 20:01:20 +02:00
2026-11-02 18:25:30 +01:00
2026-11-02 17:48:16 +01:00
2026-10-01 07:37:47 +02:00
2026-10-14 17:38:37 +02:00
2026-10-09 17:05:36 +02:00
2026-10-04 17:18:19 +02:00
2026-11-02 17:54:38 +01:00
2026-10-17 08:28:28 +02:00
2026-10-17 08:28:28 +02:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:54:38 +01:00
2026-10-07 07:39:05 +02:00
2026-11-02 17:54:38 +01:00
2026-09-16 20:15:46 +02:00
2026-10-01 07:37:47 +02:00
2026-11-02 18:25:44 +01:00
2026-09-27 14:19:22 +02:00
2026-01-01 20:00:39 +01:00
2026-11-02 17:54:38 +01:00
2026-11-01 17:22:58 +01:00
2026-10-15 20:01:21 +02:00
2026-01-01 20:00:39 +01:00
2026-10-25 06:17:51 +01:00
2026-10-16 19:16:21 +02:00
2026-09-11 08:22:50 +02:00
2026-11-02 17:48:43 +01:00
2026-10-06 07:22:55 +02:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:48:03 +01:00
2026-10-13 17:16:52 +02:00
2026-10-11 08:24:31 +02:00
2026-10-11 08:24:31 +02:00
2026-11-02 17:54:38 +01:00
2026-10-11 08:24:31 +02:00
2026-10-11 08:24:31 +02:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:54:38 +01:00
2026-10-08 16:11:16 +02:00
2026-10-06 07:22:55 +02:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:50:40 +01:00
2026-10-07 16:37:19 +02:00
2026-11-02 17:54:38 +01:00
2026-09-30 20:53:56 +02:00
2026-10-25 12:07:51 +01:00
2026-09-30 20:07:06 +02:00
2026-10-25 12:07:51 +01:00
2026-10-04 17:54:05 +02:00
2026-10-04 17:54:05 +02:00
2026-10-25 12:07:51 +01:00
2026-10-19 22:00:58 +02:00
2026-10-25 12:07:51 +01:00
2026-11-01 17:23:27 +01:00
2026-10-25 12:07:51 +01:00
2026-01-01 20:00:39 +01:00
2026-09-09 09:52:58 +02:00
2026-10-04 22:11:34 +02:00
2026-10-16 19:16:21 +02:00
2026-11-02 17:54:38 +01:00
2026-01-01 20:00:39 +01:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:54:38 +01:00
2026-11-01 20:42:58 +01:00
2026-11-02 17:54:38 +01:00
2026-10-30 15:19:42 +01:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:54:38 +01:00
2026-10-28 19:46:28 +01:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:54:38 +01:00
2026-11-01 17:21:06 +01:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:54:38 +01:00
2026-10-17 08:28:28 +02:00
2026-10-17 08:28:28 +02:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:54:38 +01:00
2026-10-12 09:33:43 +02:00
2026-10-26 17:11:55 +01:00
2026-01-01 20:00:39 +01:00
2026-10-04 17:18:19 +02:00
2026-11-02 17:54:38 +01:00
2026-10-21 08:36:31 +00:00
2026-11-02 18:25:44 +01:00
2026-10-25 12:07:51 +01:00
2026-10-25 12:07:51 +01:00
2026-09-09 09:48:17 +02:00
2026-09-16 20:15:46 +02:00
2026-10-02 17:25:17 +02:00
2026-10-09 16:56:14 +02:00
2026-11-02 17:54:38 +01:00
2026-10-04 17:18:19 +02:00
2026-10-27 14:31:31 +01:00
2026-10-19 22:00:58 +02:00
2026-10-19 22:00:31 +02:00
2026-10-01 07:33:07 +02:00
2026-01-01 20:00:39 +01:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:54:38 +01:00
2026-10-25 12:07:51 +01:00
2026-10-15 20:04:42 +02:00
2026-10-31 13:54:45 +01:00
2026-10-25 12:07:51 +01:00
2026-10-22 20:22:53 +02:00
2026-11-02 17:54:38 +01:00
2026-10-16 19:16:21 +02:00
2026-10-16 19:16:21 +02:00
2026-11-02 17:54:38 +01:00
2026-10-15 22:42:46 +02:00
2026-10-04 11:50:42 +02:00
2026-11-02 17:54:38 +01:00
2026-01-01 20:00:39 +01:00
2026-09-25 20:44:30 +02:00
2026-10-06 22:33:29 +02:00
2026-11-01 17:23:27 +01:00
2026-10-01 07:37:47 +02:00
2026-01-01 20:00:39 +01:00
2026-10-04 17:18:19 +02:00
2026-09-30 22:49:24 +02:00
2026-10-01 07:37:47 +02:00