Hello,

test done with :

a="x"
if a=="b" then 2
elsif a=="c" then 1
elsif a=="c" then 1
.... 50 elsif

a="x"
case a
 when "g" then 1
 when "i" then 1
 when  "j" then 1
 when "k" then 1
 when "l" then 1
 when "b" then 1
.... 50 when

10 microsecondes with if,
231 nanosecondes with case

I use benchi, (from ruiby, see attachment), for this kind of test.
If you need performences, try mirah with a jvm ...

Attachments:
http://www.ruby-forum.com/attachment/7683/benchi.png


-- 
Posted via http://www.ruby-forum.com/.