Niels Dossche
a8c927005e
Skip validity and length calls when the byte cannot be part of a multibyte sequence
...
Almost every character set can be given a number N such that a multibyte
sequence starts with a byte higher than that number N. This allows us to
skip a lot of work. To ensure the correctness of this, a sanity check is
implemented that exhaustively tries every 4-byte sequence for every
character set and checks for consistency issues.
This finally gives:
Time (mean ± σ): 120.2 ms ± 1.2 ms [User: 116.9 ms, System: 2.8 ms]
Range (min … max): 118.0 ms … 122.9 ms 24 runs
2024-03-07 20:27:18 +01:00
..
2023-10-09 15:23:52 +01:00
2023-01-13 11:51:15 +00:00
2023-01-16 12:27:33 +01:00
2022-10-13 11:47:24 +02:00
2021-08-20 12:03:46 +01:00
2023-08-03 20:28:11 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2024-03-07 20:27:18 +01:00
2024-03-04 21:53:52 +09:00
2024-03-04 21:53:52 +09:00
2021-05-06 12:16:35 +02:00
2023-08-16 20:34:48 +01:00
2021-08-13 20:03:26 +01:00
2021-11-03 15:18:26 +03:00
2021-06-16 16:09:06 +02:00
2024-03-07 20:27:18 +01:00
2023-12-10 17:30:08 +01:00
2023-06-29 13:13:55 +01:00
2021-05-12 14:55:53 +01:00
2021-07-29 14:21:13 +01:00
2021-05-06 12:16:35 +02:00
2021-11-03 15:18:26 +03:00
2021-05-06 12:16:35 +02:00
2022-05-29 11:20:56 +01:00
2021-05-06 12:16:35 +02:00
2023-08-10 15:25:37 +01:00
2021-05-06 12:16:35 +02:00
2023-04-28 11:05:32 +02:00
2024-01-19 23:35:23 +01:00
2021-05-12 14:55:53 +01:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2023-06-29 13:13:55 +01:00
2021-05-06 12:16:35 +02:00
2023-11-27 14:02:19 +01:00
2021-05-06 12:16:35 +02:00
2021-11-03 15:18:26 +03:00
2021-05-06 12:16:35 +02:00
2021-07-29 14:21:13 +01:00
2021-07-29 14:21:13 +01:00
2024-03-07 20:27:18 +01:00
2023-08-16 20:33:52 +01:00
2021-05-06 12:16:35 +02:00
2024-02-10 14:05:26 +01:00
2021-05-06 12:16:35 +02:00
2024-03-07 20:27:18 +01:00
2023-09-26 21:45:02 +02:00
2021-05-06 12:16:35 +02:00