Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: Did the sort do anything? Date: Fri, 13 May 2011 21:28:38 +0200 Lines: 26 Message-ID: <935f3gFbqeU1@mid.individual.net> References: <9303hcFq0nU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net wk58zEjx0tgVXGMnFgU/CQdpjpN0qqtBsbLiGIqfTmke+iA1w= Cancel-Lock: sha1:7CXENQ15M9ajigIM9dD0NeWxYfc= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 In-Reply-To: X-Antivirus: avast! (VPS 110513-0, 13.05.2011), Outbound message X-Antivirus-Status: Clean Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4059 On 13.05.2011 16:42, Roedy Green wrote: > On Wed, 11 May 2011 20:40:43 +0200, Robert Klemme > wrote, quoted or indirectly quoted > someone who said : > >> What would the benefit of this be? > > A very simple example would be a sort utility that reads data into RAM > and sorts it. If the sort did not change the order, there is no need > to write it back. Sounds plausible - at first. OTOH in such a situation I would probably rather remember the last modification time and only sort if it has changed after the last sorted writing. That way you are even more efficient because you save the effort of read IO as well. Maybe it's just that I didn't have such a use case but I am still not really convinced that what you are proposing is so useful. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/