coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: performance bug of `wc -m`


From: Eric Fischer
Subject: Re: performance bug of `wc -m`
Date: Wed, 16 May 2018 17:13:56 -0700

I also found wcwidth to be a bad performance bottleneck in my multibyte
branch of coreutils. To fix the problem in my branch, I added a cache of
the widths returned for characters in the range from 0 to UCHAR_MAX (which
perhaps should also be widened to include a few other common alphabets).
The caching code is at the bottom of


https://github.com/ericfischer/coreutils/blob/multibyte-squash/src/widetext.c

and you are welcome to it (and any of the other internationalization fixes)
if you want.

Eric


reply via email to

[Prev in Thread] Current Thread [Next in Thread]