Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Nov 2017 02:46:21 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 223532] egrep -i is terrible slow if utf-8 locale is enabled
Message-ID:  <bug-223532-8-CiDbUYbzj7@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-223532-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-223532-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223532

--- Comment #1 from Kyle Evans <kevans@freebsd.org> ---
Is this gnugrep or bsdgrep? (`egrep -V`) I'm getting something along these
lines with your reproduction steps:


root@www2:/usr/bin # env LANG=3Den_CA.UTF-8 time egrep -c foobar /tmp/tcsh4=
00
0
        1.13 real         0.73 user         0.08 sys
root@www2:/usr/bin # env LANG=3Den_CA.UTF-8 time egrep -ic foobar /tmp/tcsh=
400
0
        3.73 real         3.26 user         0.08 sys

root@www2:/usr/bin # env LANG=3DC time egrep -c foobar /tmp/tcsh400
0
        1.08 real         0.72 user         0.06 sys
root@www2:/usr/bin # env LANG=3DC time egrep -ic foobar /tmp/tcsh400
0
        1.11 real         0.74 user         0.07 sys



With:

root@www2:/usr/bin # grep -V
grep (BSD grep, GNU compatible) 2.6.0-FreeBSD

So egrep -i is still slower with bsdgrep, but it's only 3x slower than the
equivalent case-sensitive search here.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-223532-8-CiDbUYbzj7>