Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #9088
| From | Arved Sandstrom <asandstrom3minus1@eastlink.ca> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Getter performance |
| References | (3 earlier) <j7cvqo$tcp$1@news.albasani.net> <j7d0v7$eo5$1@dont-email.me> <KeYnq.9220$wa5.7836@newsfe17.iad> <lfo3a75gk7h46q1csvk6k6jrks9qce80ni@4ax.com> <rqpoq.6270$UK6.64@newsfe06.iad> |
| Message-ID | <X4zoq.10182$eY3.4818@newsfe15.iad> (permalink) |
| Organization | Public Usenet Newsgroup Access |
| Date | 2011-10-22 09:57 -0300 |
On 11-10-21 10:57 PM, Daniel Pitts wrote: > On 10/21/11 2:27 PM, Roedy Green wrote: >> I think you should know without benchmarking each individual case >> which Map or Collection would be best for a given task. > I nearly agree. > > An experienced programmer should know which Map or Collection would work > sufficiently well for a given task. "Best", by some definitions, would > almost always be a custom class (perhaps not even implementing Map or > Collection). The thing is that best may be much better than needed. Roedy may have meant "best" in this sense. It's a word with lots of definitions, one of which is "most suitable". For a software developer/engineer I'd think that "most suitable" would always be the reigning definition of "best"; another definition (like the one you posit as a possibility, leading perhaps to a custom class) might be more of a computer science thing. Roedy's right, though, with his overall comments, although I wouldn't blame anything on The Donald [1]. For starters, way too many people - having never read anything by Knuth except various quotes, have only ever seen "premature optimization is the root of all evil" in isolation. They've never read the important sentences surrounding that one, that supply essential context. I've seen it myself, that folks seize on this one sentence and disparage reasonable design-time efforts to think about performance. And I've heard often enough from other developers who should know better that we should "write it first and we'll profile it later if it's too slow". Or a memory hog. These folks forget that Knuth talked about _premature_ optimization: there's a lot of design and implementation-time optimization that ain't. c2.com on their page about "UniformlySlowCode" (http://c2.com/cgi/wiki?UniformlySlowCode) discusses a situation that can happen a lot if you don't practice experience-seasoned non-premature optimization. I've seen this happen more than once, that an app is sluggish and a memory beast, and yet when you analyze it you find that you have to fix, well, everything. AHS 1. Man, how can Trump be The Donald? It's just not right. :-) I've set matters straight here. -- I tend to watch a little TV... Court TV, once in a while. Some of the cases I get interested in. -- O. J. Simpson
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Getter performance Aéris <aeris@imirhil.fr> - 2011-10-15 23:03 +0200
Re: Getter performance Arne Vajhøj <arne@vajhoej.dk> - 2011-10-15 17:36 -0400
Re: Getter performance Arne Vajhøj <arne@vajhoej.dk> - 2011-10-15 17:42 -0400
Re: Getter performance BGB <cr88192@hotmail.com> - 2011-10-15 15:00 -0700
Re: Getter performance markspace <-@.> - 2011-10-15 15:20 -0700
Re: Getter performance David Lamb <dalamb@cs.queensu.ca> - 2011-10-20 12:45 -0400
Re: Getter performance Roedy Green <see_website@mindprod.com.invalid> - 2011-10-21 14:27 -0700
Re: Getter performance Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-10-21 18:57 -0700
Re: Getter performance Patricia Shanahan <pats@acm.org> - 2011-10-22 07:27 +0100
Re: Getter performance Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-10-22 09:57 -0300
Re: Getter performance Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-10-21 22:12 -0400
Re: Getter performance Aéris <aeris@imirhil.fr> - 2011-10-15 23:59 +0200
Re: Getter performance Arne Vajhøj <arne@vajhoej.dk> - 2011-10-15 19:44 -0400
Re: Getter performance Aéris <aeris@imirhil.fr> - 2011-10-16 13:14 +0200
Re: Getter performance Lars Enderin <lars.enderin@telia.com> - 2011-10-16 16:28 +0200
Re: Getter performance Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-10-16 09:47 -0400
Re: Getter performance Jaap Droogers <JaapDroogers@unusable.meel.homelinux.net> - 2011-10-16 22:12 +0200
Re: Getter performance BGB <cr88192@hotmail.com> - 2011-10-16 13:58 -0700
Re: Getter performance David Lamb <dalamb@cs.queensu.ca> - 2011-10-20 12:51 -0400
Re: Getter performance Paul Cager <paul.cager@googlemail.com> - 2011-10-21 08:49 -0700
Re: Getter performance Roedy Green <see_website@mindprod.com.invalid> - 2011-10-21 08:02 -0700
Re: Getter performance Wanja Gayk <brixomatic@yahoo.com> - 2011-10-22 21:11 +0200
csiph-web