On 11/11/2011 07:50 PM, Paul Eggert wrote:
> On 11/11/2011 09:55 AM, Pádraig Brady wrote:
>>   sort -b -k4.9,4.12 -k4.5b,4.7Mb -k4.2,4.3 -k4.14,4 access_log
> Whew!  That's pretty subtle.  Do you observe
> a significant performance improvement by avoiding
> -n?  I'm asking partly because the manual does it this way:
> 
>   sort -t ' ' -k 4.9n -k 4.5M -k 4.2n -k 4.14,4.21
> 
> I find this a bit easier to explain, but if it's significantly
> slower we should probably fix the manual.

I tested that previously and noted only a small performance difference
(I think). So I left the above as more appropriate for the manual.
Testing again on my current hardware shows my version is 33% _slower_
than that in the manual!  I guess explicitly checking the endpoints
of each field is slower than checking implicit sentinels in the data.

cheers,
Pádraig.



Reply via email to