]> granicus.if.org Git - php/commit
Optimize php_unicode_convert_case (cuts mbstring case conversion time ~15%)
authorAlex Dowad <alexinbeijing@gmail.com>
Sat, 27 Jun 2020 22:25:13 +0000 (00:25 +0200)
committerAlex Dowad <alexinbeijing@gmail.com>
Mon, 31 Aug 2020 21:17:25 +0000 (23:17 +0200)
commitea3f0ee0b9d27ec07bc137f2672dead46e0b61c4
tree1809be20783b86179d44518cc713359698f6ca37
parentddc76e5abf0f962af56bceb0f1bde998582f9d82
Optimize php_unicode_convert_case (cuts mbstring case conversion time ~15%)

This function uses various subfunctions to convert case of Unicode wchars.
Previously, these subfunctions would store the case-converted characters in
a buffer, and the parent function would then pass them (byte by byte) to
the next filter in the filter chain.

Rather than passing around that buffer, it's better for the subfunctions to
directly pass the case-converted bytes to the next filter in the filter chain.
This speeds things up nicely.
ext/mbstring/php_unicode.c