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
..
2024-02-18 11:39:00 +01:00
2024-02-25 08:41:31 +01:00
2024-02-18 11:39:00 +01:00
2024-02-25 08:41:31 +01:00
2024-02-18 11:39:00 +01:00
2024-02-21 00:46:22 +00:00
2024-03-06 09:18:22 +00:00
2024-02-18 11:39:00 +01:00
2024-02-25 08:41:31 +01:00
2024-02-26 19:44:52 +01:00
2024-02-25 08:41:31 +01:00
2024-02-18 11:39:00 +01:00
2024-03-01 19:31:55 +01:00
2024-02-25 08:41:31 +01:00
2024-02-18 11:39:00 +01:00
2024-02-25 08:41:31 +01:00
2024-02-26 14:00:08 +01:00
2024-03-05 20:56:17 +00:00
2024-02-25 08:41:31 +01:00
2024-02-25 08:41:31 +01:00
2024-02-18 11:39:00 +01:00
2024-02-26 17:03:17 +00:00
2024-02-25 08:41:31 +01:00
2024-02-25 08:41:31 +01:00
2024-02-25 21:03:37 +01:00
2024-02-20 17:58:47 +01:00
2024-02-25 08:41:31 +01:00
2024-03-07 20:27:18 +01:00
2024-03-01 20:40:16 +01:00
2024-03-07 19:38:03 +03:00
2024-03-07 17:54:54 +01:00
2024-02-25 08:41:31 +01:00
2024-03-05 20:51:04 +01:00
2024-03-04 17:36:51 +01:00
2024-02-18 11:39:00 +01:00
2024-02-18 11:39:00 +01:00
2024-03-07 20:27:18 +01:00
2024-02-18 11:39:00 +01:00
2024-03-01 20:40:16 +01:00
2024-02-27 15:32:20 +00:00
2024-03-01 20:40:16 +01:00
2024-02-25 08:41:31 +01:00
2024-02-25 08:41:31 +01:00
2024-03-06 18:57:17 +01:00
2024-02-18 11:39:00 +01:00
2024-02-27 21:49:47 +01:00
2024-03-02 11:29:15 +00:00
2024-02-25 08:41:31 +01:00
2024-02-25 21:03:37 +01:00
2024-02-18 11:39:00 +01:00
2024-02-25 08:41:31 +01:00
2024-02-18 18:01:12 +01:00
2024-03-06 11:39:48 +00:00
2024-02-25 08:41:31 +01:00
2024-02-28 15:31:28 +00:00
2024-02-25 08:41:31 +01:00
2024-03-05 20:51:12 +01:00
2024-02-18 11:39:00 +01:00
2024-02-22 15:48:12 +01:00
2024-02-18 11:39:00 +01:00
2024-02-25 08:41:31 +01:00
2024-02-18 11:39:00 +01:00
2024-02-27 21:49:47 +01:00
2024-03-05 20:50:54 +01:00
2024-02-25 08:41:31 +01:00
2024-02-24 21:31:01 +01:00
2024-02-26 14:04:33 +01:00
2024-02-25 08:41:31 +01:00
2024-03-05 10:13:57 +01:00