Skip to main content
15 events
when toggle format what by license comment
Nov 4, 2024 at 17:32 comment added Nick Steele Probably of interest to everyone here, Beyond Fireship just released a video, specifically addressing @crush's comment with 67 upvotes, performance in general, and optimization youtube.com/watch?v=_pWA4rbzvIg
Mar 1, 2021 at 0:57 comment added CaTs @crush I think that HashSets being measured and documented is irrelevant to the point. selecting the right tool for the job should also take into account the cost of using the tool and whether or not the problem being solved is worth this cost.
Feb 28, 2021 at 22:48 history edited Dave Jarvis CC BY-SA 4.0
ben != been
Feb 1, 2021 at 15:42 history edited jaskij CC BY-SA 4.0
Add transcript of the full quote (for ease of reading and accesibility)
Feb 1, 2021 at 1:50 history edited Dave Jarvis CC BY-SA 4.0
added 115 characters in body
Apr 13, 2019 at 9:16 comment added KolA Yep. Basically what Knuth meant under "premature optimization" would sound more accurate as "optimization before profiling". Original quote abused too much as an excuse not to optimize code at all.
Dec 11, 2014 at 17:46 history edited gnat CC BY-SA 3.0
minor typo correction
Apr 28, 2014 at 2:39 comment added Erik Kaplun I would like to add that premature optimization should not be confused with designing your entire application architecture to run fast in general, scale and be easily optimizable.
Apr 28, 2014 at 2:38 comment added Erik Kaplun @crush: yes: Set is also more semantically correct and informative than List, so there's more than the optimization aspect to it.
Jan 23, 2014 at 14:33 comment added crush I had a 20k rep user today tell me that using a HashSet instead of a List was premature optimization. The use case in question was a statically initialized collection thats sole purpose was to serve as a look-up table. I don't think I'm wrong in saying there is a distinction in selecting the right tool for the job versus premature optimization. I think your post confirms this philosophy: There are obvious optimizations...anything that isn't trivially clear optimization should be avoided until it can be measured. The optimization of a HashSet has been thoroughly measured and documented.
Oct 27, 2013 at 3:20 history made wiki Post Made Community Wiki by Michael Shaw
Oct 10, 2011 at 1:52 vote accept Craig Day
May 29, 2011 at 8:37 history migrated from stackoverflow.com (revisions)
Mar 1, 2010 at 17:57 comment added mctylr Being from Donald Knuth, I wouldn't be surprized if he had some evidence to back it up. BTW, Src: Structured Programming with go to Statements, ACM Journal Computing Surveys, Vol 6, No. 4, Dec. 1974. p.268. citeseerx.ist.psu.edu/viewdoc/…
Oct 17, 2008 at 9:16 history answered Scott Dorman CC BY-SA 2.5