From: Alex Young Date: 2007-08-03T02:16:23+09:00 Subject: Re: sytnax dblack@rubypal.com wrote: > Hi -- > > On Thu, 2 Aug 2007, Phlip wrote: > >> Shai Rosenfeld wrote: >> >>>> var = { 1 => 'one', 2 => 'two', 3 => 'three' }.fetch(number, 'else') >>> >>> nice! :) >>> >>> any lead to which one is faster? >> >> D'OH! >> >> (There was just a big discussion on Ruby performance, or lack thereof. >> Google "Performance diffrence between ifs and case", and learn A> >> premature optimization is the root of all evil, and B> you can profile >> each system with unit tests and Benchmark library.) > > Not all optimization is premature, and it's not the case that no > information is available to people before they start to code > something, or even just out of academic or scientific interest quite > apart from any particular coding project. > > There's a long history of quite interesting discussion about > performance on this list, often involving benchmark reports (and > therefore explicitly in the knowledge of the relevance of the > benchmarking process). Those discussions can be very illuminating, > and I'd prefer not to see them routinely squashed before they have a > chance to start. They're only going to get more interesting in future, as we have more different implementations to play with, too... -- Alex