Pádraig Brady wrote: > That suggests we're not replacing > wcwidth on this OSX system, and that the system implementation > is just very slow, which the attached patch should avoid if possible.
If we have a system where wcwidth is very slow, gnulib could override the function with a faster implementation (like it already does e.g. for 'strstr'). This is possible here, because the wchar_t implementation is known (unlike older BSDs and/or Solaris). However, before we do this, can you please check whether it already uses the gnulib replacement or not? ('nm src/wc | grep width') On my macOS 10.13 system, it links in rpl_wcwidth, and therefore the system's wcwidth performance is irrelevant (because our test is running in an UTF-8 locale and therefore rpl_wcwidth calls uc_width, never wcwidth). Bruno