1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 13:31:27 +02:00
Files
archived-php-src/ext
Alex Dowad ffbddc4848 Optimize conversion of GB18030 to Unicode
As with CP936, iterating over the PUA table and looking for matches in
it was a significant bottleneck for GB18030 decoding (though not as
severe a bottleneck as for CP936, since more is involved in GB18030
decoding than CP936 decoding).

Here are some benchmark results after optimizing out that bottleneck:

    GB18030, medium - to UTF-16BE - faster by 60.71% (0.0007 vs 0.0017)
    GB18030, medium - to UTF-8    - faster by 59.88% (0.0007 vs 0.0017)
    GB18030, long - to UTF-8      - faster by 44.91% (0.0669 vs 0.1214)
    GB18030, long - to UTF-16BE   - faster by 43.05% (0.0672 vs 0.1181)
    GB18030, short - to UTF-8     - faster by 27.22% (0.0003 vs 0.0004)
    GB18030, short - to UTF-16BE  - faster by 26.98% (0.0003 vs 0.0004)

(The 'short' test strings had 0-5 codepoints each, 'medium' ~100
codepoints, and 'long' ~10,000 codepoints. For each benchmark, the
test harness cycled through all the test strings 40,000 times.)
2023-01-04 21:58:27 +02:00
..
2022-06-25 07:40:19 +01:00
2022-10-27 14:42:17 +01:00
2022-12-20 16:07:02 +00:00
2022-09-07 17:41:10 +02:00
2022-10-27 14:42:40 +01:00
2022-10-27 14:42:40 +01:00
2022-10-24 15:03:25 +02:00
2022-12-23 16:29:39 +00:00
2022-12-11 17:30:56 +01:00
2022-12-13 23:48:48 +00:00
2022-12-16 14:38:09 +01:00
2022-12-09 16:10:36 +01:00
2022-09-27 23:32:37 +02:00
2022-09-06 10:42:34 +01:00
2022-11-13 11:10:10 +01:00
2022-12-18 23:21:30 -07:00
2022-11-30 12:13:36 +01:00
2022-10-19 11:37:30 +02:00
2022-12-19 16:17:02 +01:00
2022-09-07 17:41:10 +02:00
2022-10-13 16:08:50 +02:00
2022-12-02 12:49:08 +00:00
2022-12-06 16:01:24 +01:00
2022-10-27 14:42:40 +01:00
2022-09-26 23:13:31 +02:00
2022-09-14 23:55:46 +02:00