Much faster? i18n? tls?

Mike A. Harris mharris at redhat.com
Mon Nov 10 08:18:31 UTC 2003


On Mon, 10 Nov 2003, Behdad Esfahbod wrote:

>Was tweaking with the grep patch, and also tracking another
>thread in another list, which was showing how on Red Hat 9 a
>simple text intensive program (called hspell) is much slower than
>Red Hat 8, and investigations have shown so far that it's all
>caused by /lib/tls.  Switching to /lib/i686 makes things go much
>faster.  Any idea?  And it's not a multi-threaded application.
>
>
>So I focus on sed:  Pretty slow on non-C locales:-(
>
>[behdad at mces behdad]$ echo $LANG
>en_US.UTF-8
>[behdad at mces behdad]$ ll /bin/ls
>-rwxr-xr-x    1 root     root        73460 Oct 12 04:50 /bin/ls
>[behdad at mces behdad]$ time sed -e 's/./x/g' /bin/ls > /dev/null
>
>real    0m4.248s
>user    0m3.800s
>sys     0m0.000s
>[behdad at mces behdad]$ time LANG=C sed -e 's/./x/g' /bin/ls > /dev/null
>
>real    0m0.180s
>user    0m0.050s
>sys     0m0.000s
>[behdad at mces behdad]$
>
>And /bin/ls is only 72kb!!!

You should average the times of multiple runs, at least 5-10 for
each test case to help remove noise from the numbers, and
remove/reduce cache colouring and other factors from getting in
the way of your numbers.



-- 
Mike A. Harris     ftp://people.redhat.com/mharris
OS Systems Engineer - XFree86 maintainer - Red Hat





More information about the fedora-devel-list mailing list