#
803cd824 |
| 28-Nov-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Optimizations for mb_trim (#12803) * 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
Optimizations for mb_trim (#12803) * 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.
show more ...
|