coreutils
[Top][All Lists]
Advanced

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

Re: [coreutils] [PATCH] sort: -h now handles comparisons such as 6000K v


From: Pádraig Brady
Subject: Re: [coreutils] [PATCH] sort: -h now handles comparisons such as 6000K vs 5M and 5MiB vs 5MB
Date: Fri, 30 Jul 2010 12:06:22 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 30/07/10 08:59, Paul Eggert wrote:
> I discovered a race condition in coreutils sort, when running
> multithreaded, in the check_mixed_SI_IEC function.  Rather than add
> interlocks, I decided to address the underlying problem by fixing
> coreutils to do the right thing with mixed SI and IEC prefixes (modulo
> rounding errors).  To do this I installed the following:

This is more general, but seems slightly overengineered given that coreutils
doesn't produce mixed prefixes or non uninform abbreviations.
Also it's slower and now -h can't sort numbers with thousands
separators which is a common "human" format. I know we can with -n, but it's
a shame to lose that with -h. Perhaps since strtold() is so heavy weight anyway,
we could strip commas first?

cheers,
Pádraig.



reply via email to

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