From: John Carter Date: 2007-07-30T06:57:56+09:00 Subject: Re: Performance diffrence between ifs and case On Sun, 29 Jul 2007, Sean Surname wrote: > Phlip wrote: >> forgottenwizard wrote: >> >>> What kind of diffrences are there, effectivly, between case and a series >>> of if statements, like in this: >> >> Google for "premature optimization is the root of all evil". > > Classify as "nostrum-emitting moron." a) Phlip emits very valid and important nostrums. b) Definitely not a moron, you'll miss some Good Stuff if you make that mistake. c) Once anyone actually benchmarks the difference and hence contributes real data to the discussion.... Write it up here... http://rubygarden.org/ruby/page/show/RubyOptimization ...the wiki page where I keep breadcrumbs of info for when desperation requires me to shovel perfectly correct nostrums to one side and put in a twist of speed. Speaking of which... Rubygarden seems to be slow.. Gah! Spammers have totally vandalized that page. Twice. Hmm. That's probably why it's so slow, probably a major spam attack... I hate spammers. Really the complete scum of the earth. The Lambda the Ultimate (excellent programming language design site) http://lambda-the-ultimate.org crew have also been under attack. Anyway, Ruby garden has nice review and revert facilities so it's fixed now. John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand