mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
* Fast path for when there is nothing to trim in mb_trim * Make mb_trim decide between linear search vs hash table lookup Using empirical experiments I noticed that on my i7-4790 the hash table approach becomes faster once we have more than 4 code points in the trim characters, when evaluated on the worst case. This patch changes the logic so that a hash table is used for a large number of trim characters, and linear search when the number of trim characters is <= 4.