[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to sort words in a line
From: |
Harald Hanche-Olsen |
Subject: |
Re: how to sort words in a line |
Date: |
Tue, 17 Jul 2007 22:12:07 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (berkeley-unix) |
+ Rainer Stengele <rainer.stengele@online.de>:
| Harald Hanche-Olsen schrieb:
|> You could also pipe the line through the command
|>
|> tr ' ' \n | sort | tr \n ' '
|
| calling external processes to sort a line seems to me quite a little
| overhead.
It all depends. For example, it depends on how often you need to do
this thing. If you do it only very rarely, I would assume that the
savings of your time (seconds? minutes?) is more valuable than the
wasted milliseconds of CPU time. But, your milage may vary, as they
say. Perhaps your time is worthless, and CPU cycles are really
valuable. Lots of people behave like this is so. I fall into the
trap myself from time to time.
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
- how to sort words in a line, Rainer Stengele, 2007/07/17
- Re: how to sort words in a line, Pascal Bourguignon, 2007/07/17
- Re: how to sort words in a line, Rainer Stengele, 2007/07/17
- Re: how to sort words in a line, Thien-Thi Nguyen, 2007/07/17
- Re: how to sort words in a line, Nikolaj Schumacher, 2007/07/17
- Re: how to sort words in a line, Mathias Dahl, 2007/07/18
- Re: how to sort words in a line, Rainer Stengele, 2007/07/18