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: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Getter performance Date: Fri, 21 Oct 2011 22:12:15 -0400 Organization: A noiseless patient Spider Lines: 27 Message-ID: References: <4e99f537$0$623$426a74cc@news.free.fr> <4e99fcdf$0$295$14726298@news.sunsite.dk> <4e99fe53$0$281$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 22 Oct 2011 02:12:14 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="f8igmItKsWs6nM5YanFxAA"; logging-data="1556"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18AF48iznhAhdF7rudYsyEV" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 In-Reply-To: Cancel-Lock: sha1:Ut5TBZ2ezZX6O6ROTVYI+UJAse0= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9084 On 10/21/2011 5:27 PM, Roedy Green wrote: >[...] > Knuth has frightened people from even investigating speed out of > curiosity. Oh, yeah, right. As in "Ri-i-i-i-ght." That's why he didn't write three entire volumes of TAOCP (and more in the works) in an effort to reach beyond O() notation to the constant factors that lie behind. That's why he didn't devote a whole lot of text and a whole lot of subtle mathematics to winkling out differences between O(n log n) Quicksort and O(n log n) Mergesort and O(n log n) Heapsort and O(n log n(?)) Shellsort. That's why he never explored threaded trees (they improve some operations by a factor of only O(log n) so who cares?). That's why he never bothered with Marsaglia's rectangle-wedge-tail method for generating normally- distributed random numbers; it's just a trifling micro-optimization. Oh, sorry, wait: By "frightened" you don't mean "dissuaded," but literally "scared." Well, I confess that some of Knuth's math goes over my head. But I feel at the same time that someone who shrinks from even trying to understand it does not merit the title of "engineer." -- Eric Sosman esosman@ieee-dot-org.invalid