From: William Paulson Date: 2012-06-21T01:42:35+09:00 Subject: Re: Benchmark obsession? I'd say more like a "common fallacy" than an obsession. Indeed, it's a common problem across all languages, not just Ruby. I recall advice in Basic that said "don't use new lines unless you need a label." In thirty years of coding and performance evaluation, I can't recall a case where micro-tuning was sufficient to solve a performance issue, yet there are many times I've seen it used. Sent from my iPhone On Jun 20, 2012, at 11:02 AM, Robert Klemme wrote: > On Wed, Jun 20, 2012 at 4:43 PM, Jan E. wrote: >> After having read this list for a while, I wonder why some of you put so >> much weight on speed optimizations. > > I can't say I have observed an _obsession_ with things like these. > Maybe it's just the fun or that it is so easy to Benchmark. :-) > >> I'm not talking about big things >> that really make sense but small stuff like "Don't use symbols, they >> can't be garbage collected", > > That is certainly a stupid general rule because in some situations > this is exactly what you want: identifiers which do not need to be > created and which are not GC'ed. > >> "Don't concatenate strings, use string >> interpolation instead", "Don't use Enumerable#inject to build up >> objects" etc. etc. > > As I said, I don't have made the same observation you apparently have > made. I do not read most of the traffic here but if it really was > obsessive I think I would have noticed. Strange how perceptions can > be so different. > > Cheers > > robert > > -- > remember.guy do |as, often| as.you_can - without end > http://blog.rubybestpractices.com/ >