Re:The C Standard Library Function Isspace() Depends on Locale
by burntsushi on Wednesday June 07, 2023 @08:20AM
(#36225880)
For GNU grep in particular, no, using a UTF-8 locale can significantly slow it down:
Where as ripgrep is just Unicode aware by default, and still about as fast as the ASCII only variant of GNU grep above:
[ Parent
| on HN ]
Re:The C Standard Library Function Isspace() Depends on Locale
by kps on Wednesday June 07, 2023 @10:03AM
(#36226907)
For grep, how much of the difference is due to '\w' having a different meaning between the two cases?
Re:The C Standard Library Function Isspace() Depends on Locale
by burntsushi on Thursday June 08, 2023 @07:17AM
(#36239992)
That's exactly the point. ripgrep uses the Unicode definition by default and so corresponds to what GNU grep is doing in the en_US.UTF-8 locale.