coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coreutils] [PATCH] stat: optimize and translate default format stri


From: Eric Blake
Subject: Re: [coreutils] [PATCH] stat: optimize and translate default format strings
Date: Fri, 01 Oct 2010 15:01:36 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.4

On 10/01/2010 02:44 PM, Jim Meyering wrote:
Eric Blake wrote:
* src/stat.c (main): Hoist default format computation out of loop.

This one should be uncontroversial, but just to be safe: OK to push?

Yes.
Thank you for the factoring.
Did you do any before/after testing, to be sure that nothing changed?

'make check' had the same results before and after (but given the level of stat(1) testing in make, I wouldn't count too much on that...). But more specifically:

for opts in '' -t -f -ft; do
  cmp <(         stat-pre $opts . /dev/null) \
      <(LC_ALL=C src/stat $opts . /dev/null)
done

showed no difference, and covers all the code paths of default_format(). (The LC_ALL=C is a bit of overkill until someone actually translates the string).

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]