On Thu, 5 Mar 2020 at 11:59, Aleksander Machniak <a...@alec.pl> wrote:
> > Also, I have a case in which iconv_* functions were much much slower > than mbstring. See wordwrap implementation in > > https://github.com/roundcube/roundcubemail/blob/master/program/lib/Roundcube/rcube_mime.php#L589 > > Either I misread, or you did: I thought that's exactly what Christoph was saying, that iconv_* functions will be slower because they basically do convert-process-unconvert rather than having implementations for each encoding. So mb_strlen will always be faster than iconv_strlen. iconv() vs mb_convert_encoding() doesn't have the same penalty. It seems quite plausible that a library dedicated to converting charsets would be more optimised for that job than a single function in a larger library mainly focussed on working with one charset at a time. Regards, -- Rowan Tommins [IMSoP]