Niels Lohmann
02d57db31e
Do not compare an edited NaN equal to itself in json_view ( #6085 )
...
Two views compared equal when the tokens of two floats were equal, and
the same node was equal to itself. An edit writes a NaN as the token
"nan", so a view of it (or of an array holding it) was equal to itself
and to another NaN, while json(NaN) == json(NaN) and view == json are
false. The token shortcut now excludes the edited "nan" token (found by
the missing digit layout), dispatched on the document mode by a tag: a
read-only document cannot hold a NaN, and its walk is unchanged
(instruction count and cycles on canada, citm and twitter within
noise). For editable documents the check costs about 2 % instructions
on canada (cycles within noise). The same-node shortcut is kept for
read-only documents and for editable ones that were never edited; a
document with edits is walked, so comparing it with itself is linear
instead of constant.
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-11-11 22:36:54 +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-11-04 17:13:16 +01:00
2026-10-15 20:01:20 +02:00
2026-11-11 22:32:05 +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-04 17:13:25 +01:00
2026-10-17 08:28:28 +02:00
2026-10-17 08:28:28 +02:00
2026-11-04 23:42:17 +01:00
2026-11-02 17:54:38 +01:00
2026-11-11 22:32:50 +01:00
2026-11-10 22:30:31 +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-03 13:42:46 +01:00
2026-11-11 22:31:20 +01:00
2026-11-11 22:32:05 +01: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-11-10 07:08:44 +01: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-11 22:32:05 +01:00
2026-11-11 22:32:05 +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-03 13:42:46 +01:00
2026-10-08 16:11:16 +02:00
2026-10-06 07:22:55 +02:00
2026-11-10 22:30:31 +01:00
2026-11-11 22:32:05 +01:00
2026-10-07 16:37:19 +02:00
2026-11-11 22:32:05 +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-11-07 14:27:52 +01: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-11 22:32:05 +01:00
2026-11-02 17:54:38 +01:00
2026-11-11 22:36:17 +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-11-11 22:36:54 +01:00
2026-11-02 17:54:38 +01:00
2026-11-02 17:54:38 +01:00
2026-11-11 22:36:54 +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-03 13:42:46 +01:00
2026-11-11 22:32:05 +01:00
2026-11-11 22:32:05 +01:00
2026-11-02 17:54:38 +01:00
2026-11-03 19:17:41 +01:00
2026-11-11 22:32:05 +01:00
2026-11-11 22:32:05 +01:00
2026-01-01 20:00:39 +01:00
2026-11-11 22:32:05 +01:00
2026-11-03 13:42:46 +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-03 13:42:46 +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-11-11 22:32:05 +01:00
2026-01-01 20:00:39 +01:00
2026-11-11 22:32:05 +01:00
2026-11-04 17:13:16 +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-03 13:42:46 +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-04 17:13:16 +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