Much faster? i18n? tls?
Behdad Esfahbod
behdad at cs.toronto.edu
Mon Nov 10 09:45:31 UTC 2003
On Mon, 10 Nov 2003, Mike A. Harris wrote:
> 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.
Well, I have already done that. And with a few hundred megs of
free memory and a 2.4 P4M idle CPU, and such a huge difference, I
believe s/n is high enough.
More information about the fedora-devel-list
mailing list