Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Gene Wirchenko Newsgroups: comp.lang.java.programmer Subject: Re: StringBuilder Difficulties Date: Fri, 08 Jul 2011 11:51:16 -0700 Organization: A noiseless patient Spider Lines: 43 Message-ID: References: <97jikdFr6pU3@mid.individual.net> <97otvfFdmmU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="7Qrvczazr82YckO5XW8Vtw"; logging-data="23634"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19XzRo7oth4WoE2cdWZCERkI+xSaO8NQ1E=" X-Newsreader: Forte Agent 4.2/32.1118 Cancel-Lock: sha1:2wDBlz+xH5QpcxqpUBwyfC5a9Yg= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5993 On 8 Jul 2011 17:44:16 GMT, blmblm@myrealbox.com wrote: >In article , >Gene Wirchenko wrote: >> On 6 Jul 2011 16:59:57 GMT, blmblm@myrealbox.com >> wrote: >> >> [snip] >> >> >Gene seems to be saying elsethread that in his real code he might >> >be initializing from something that isn't in order. But assuming he >> >> Yup. >> >> >could put it in order before initializing the set, then yes, it seems >> >> Why bother? SortedSet does the work for me. > >If you care enough about performance to have put some effort >into benchmarking various approaches, I'd have thought you'd be >interested in one that seems to be significantly faster and almost >as simple to set up and use. (Probably -- I guess it depends on >how, in your real code, you'll be initializing the set.) But why should I write code to sort something when SortedSet will do it for me? Plus, if I output the contents of the set, having it in sorted order makes more sense. Remember that I am learning my way around Java. You may already know how to do it quickly. For me, it would be another thing to find and figure out. In time, in time. >I'm not unsympathetic, though, to a desire to move on once >an acceptable solution has been found. "Just sayin'", maybe. Micro-optimisation is a nasty sin. [snip] Sincerely, Gene Wirchenko