3 ms·
Obtaining useful information in contexts or from people you find unpleasant is a handy skill.
by zachbeane 16y ago
Obtaining useful information in contexts or from people you find unpleasant is a handy skill.
- jimbokun 16y agoIn this case, the useful skill is scanning that wall of text to extract the small nugget of useful information: For small N, finding something in an association list can be faster than finding the same thing in a hash table. Naggum also could have run some quick bench marks and figured out at what size N hash tables become a better choice (depending on the nature of the keys, etc. etc.), in less time than he spent berating the intelligence of the questioner.
- jules 16y agoI doubt he is right for any N. Association lists require on average N+1 memory accesses. Small hash tables require 1 memory access. Only in edge cases like looking up a long string in an alist consisting of one short string he's right.
- reynolds 16y agoThat nugget of useful information is also explained (in a lot more detail) in one of the first chapters of the "Introduction to Algorithms" book. When I was working through the book (and I still am to some extent), it was basically beat into my brain that some algorithms with worse performance could perform better than faster algorithms for a small enough n.
- silentbicycle 16y agoIt's good to be able to endure it when necessary, sure, but it's also good to avoid needlessly perpetuating bitterness. Is it really that hard to say, "Complex algorithms have higher constant factors, so for small values of N, 'naive' ones can still be faster. When in doubt, measure." without chewing somebody out?
- dlytle 16y agoAgreed, but being able to present useful information in a context that makes people more receptive, rather than hostile, is also a handy skill. It's easy to deliberately overlook rudeness, but it still unconsciously colors a person's responses and thoughts, which could have a negative impact on the message.