A. Pagaltzis wrote: > Reminds me, this is not the only GNU tool that needs such > treatment. GNU grep pays attention to the locale as well, but its > encoding decoder is apparently written in Visual Basic -- if you > use a UTF-8 locale, it will slow down by TWO ORDERS OF MAGNITUDE. > > $ time LC_CTYPE=en_US.utf8 grep -cq tes /usr/share/dict/words > > real 0m0.686s > user 0m0.680s > sys 0m0.004s > > $ time LC_CTYPE=C grep -cq tes /usr/share/dict/words > > real 0m0.006s > user 0m0.004s > sys 0m0.000s
Are you sure you didn't just measure disk caching? I don't any different results between the two on OS X. -- ROCKS FALL! EVERYONE DIES! http://www.somethingpositive.net/sp05032002.shtml