Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Nov 2009 00:03:50 +0100
From:      Mel Flynn <mel.flynn+fbsd.hackers@mailing.thruhere.net>
To:        freebsd-hackers@freebsd.org
Subject:   Grep -i and UTF-8 (Was: Re: Issue with grep -i (on i386 only?))
Message-ID:  <200911050003.51080.mel.flynn%2Bfbsd.hackers@mailing.thruhere.net>
In-Reply-To: <200911041349.54943.mel.flynn%2Bfbsd.hackers@mailing.thruhere.net>
References:  <200911032122.28905.mel.flynn%2Bfbsd.hackers@mailing.thruhere.net> <T7DtLCOP0cwiekv/7ybsxY3l5dQ@7ANLw7WpNQUEViOFvqmcIRbmcl4> <200911041349.54943.mel.flynn%2Bfbsd.hackers@mailing.thruhere.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 04 November 2009 13:49:54 Mel Flynn wrote:

> Using env MALLOC_OPTIONS= also has no impact at all (just in case defaults
> aren't that). Since fgrep is fast and basically seeds the cache for grep,
>  I'm ruling out disks/io reads. In fact, /tmp on this laptop is memory disk
>  (one reason I couldn't go up to 64M :)). I honestly can't figure out what
>  my 'local problem' could be or your optimization.

It hit me. Rather then a local problem, it's a locale problem:
=>>> 16777216
    =>>> en_US.UTF-8
        =>>> fgrep
        0.04 real         0.04 user         0.00 sys
        0.04 real         0.02 user         0.02 sys
        0.02 real         0.01 user         0.00 sys
        =>>> grep
        0.04 real         0.04 user         0.00 sys
        3.74 real         3.55 user         0.02 sys
        1.95 real         1.83 user         0.03 sys
    =>>> en_US.ISO8859-1
        =>>> fgrep
        0.04 real         0.04 user         0.00 sys
        0.04 real         0.03 user         0.00 sys
        0.02 real         0.01 user         0.01 sys
        =>>> grep
        0.05 real         0.03 user         0.00 sys
        0.05 real         0.04 user         0.00 sys
        0.08 real         0.04 user         0.03 sys
    =>>> en_US.US-ASCII
        =>>> fgrep
        0.04 real         0.01 user         0.02 sys
        0.05 real         0.03 user         0.01 sys
        0.02 real         0.00 user         0.02 sys
        =>>> grep
        0.04 real         0.03 user         0.00 sys
        0.05 real         0.03 user         0.00 sys
        0.08 real         0.06 user         0.01 sys

-- 
Mel



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911050003.51080.mel.flynn%2Bfbsd.hackers>